Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
At sign
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Computer languages === @ is used in various [[programming language]]s and other [[computer language]]s, although there is not a consistent theme to its usage. For example: * In [[ActionScript]], @ is used in XML parsing and traversal as a string prefix to identify attributes in contrast to child elements.<ref>{{Cite web |title=Operators – Adobe ActionScript® 3 (AS3) API Reference |url=https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/operators.html#attribute_identifier |access-date=2023-05-12 |website=help.adobe.com |language=en-us |archive-date=2023-05-12 |archive-url=https://web.archive.org/web/20230512112456/https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/operators.html#attribute_identifier |url-status=live }}</ref> * In [[Ada (programming language)|Ada]] 2022, @ is the ''target name'' symbol, an abbreviation of the [[Sides of an equation|LHS]] of an assignment; it is used to avoid repetition of potentially long names in assignment statements.<ref>{{Cite web |url=http://www.ada-auth.org/standards/22rm/html/rm-5-2-1.html |title=Ada Reference Manual (Ada 2022). Target Name Symbols |website=ada-auth.org |access-date=2024-07-16}}</ref> For example: <code>A_Very_Long_Variable_Name := A_Very_Long_Variable_Name + 1;</code> is shortened to <code>A_Very_Long_Variable_Name := @ + 1;</code>, increasing readability. * In [[ALGOL 68]], the @ symbol is ''brief form'' of the '''at''' [[keyword (computer programming)|keyword]]; it is used to change the lower bound of an array. For example: {{code|arrayx[@88]}} refers to an array starting at index 88.<ref>{{Cite journal |last=van Wijngaarden |first=A. |date=1981-08-16 |title=Revised Report of the Algorithmic Language Algol 68 |url=https://dl.acm.org/doi/10.5555/1064084.1064085 |journal=ALGOL Bulletin |issue=Sup 47 |pages=121, 532 |doi= |issn=0084-6198 |access-date=2023-05-12 |archive-date=2023-05-12 |archive-url=https://web.archive.org/web/20230512112455/https://dl.acm.org/doi/10.5555/1064084.1064085 |url-status=live }}</ref> * In Dyalog [[APL (programming language)|APL]], @ is used as a functional way to modify or replace data '''at''' specific locations in an array. * In the [[ASP.NET MVC]] [[Microsoft ASP.NET Razor view engine|Razor]] template markup syntax, the @ character denotes the start of code statement blocks or the start of text content.<ref>{{Cite web |last=Phil Haack |title=Razor syntax quick reference |date=6 January 2011 |url=http://haacked.com/archive/2011/01/06/razor-syntax-quick-reference.aspx |access-date=12 January 2013 |archive-date=26 January 2022 |archive-url=https://web.archive.org/web/20220126032007/http://haacked.com/archive/2011/01/06/razor-syntax-quick-reference.aspx/ |url-status=live }}</ref><ref>{{Cite web |title=ASP.NET MVC 3: Razor's @: and <text> syntax |url=https://weblogs.asp.net/scottgu/asp-net-mvc-3-razor-s-and-lt-text-gt-syntax |access-date=2020-04-30 |website=weblogs.asp.net |date=16 December 2010 |language=en-US |archive-date=2020-07-26 |archive-url=https://web.archive.org/web/20200726111727/https://weblogs.asp.net/scottgu/asp-net-mvc-3-razor-s-and-lt-text-gt-syntax |url-status=live }}</ref> * In [[Assembly language]], @ is sometimes used as a [[dereference operator]].<ref>{{Cite web |title=assembly – @ sign in assembler? – Stack Overflow |url=https://stackoverflow.com/questions/11214675/sign-in-assembler |website=stackoverflow.com |access-date=2021-05-02 |archive-date=2021-10-05 |archive-url=https://web.archive.org/web/20211005220705/https://stackoverflow.com/questions/11214675/sign-in-assembler |url-status=live }}</ref> * In [[CSS]], @ is used in special statements outside of a CSS block.<ref>{{Cite web |title=At-rules |url=https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule |access-date=2020-04-30 |website=MDN Web Docs |language=en |archive-date=2020-05-05 |archive-url=https://web.archive.org/web/20200505194617/https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule |url-status=live }}</ref> * In [[C Sharp (programming language)|C#]], it denotes "verbatim strings", where no characters are escaped and two double-quote characters represent a single double-quote.<ref>[http://msdn.microsoft.com/en-us/library/aa691090%28v=vs.71%29.aspx 2.4.4.5 String literals] {{Webarchive|url=https://web.archive.org/web/20120805045534/http://msdn.microsoft.com/en-us/library/aa691090(v=vs.71).aspx |date=2012-08-05 }},</ref> As a prefix it also allows keywords to be used as [[identifier (computer programming)|identifiers]],<ref>{{Cite web |title=2.4.2 Identifiers |url=http://msdn.microsoft.com/en-us/library/aa664670%28v=vs.71%29.aspx |access-date=2012-08-16 |archive-date=2012-08-10 |archive-url=https://web.archive.org/web/20120810204003/http://msdn.microsoft.com/en-us/library/aa664670(v=vs.71).aspx |url-status=live }}</ref> a form of [[Stropping (syntax)|stropping]]. * In [[D (programming language)|D]], it denotes function attributes: like: <code>@safe</code>, <code>@nogc</code>, user defined <code>@('from_user')</code> which can be evaluated at compile time (with <code>__traits</code>) or <code>@property</code> to declare properties, which are functions that can be syntactically treated as if they were fields or variables.<ref>{{Cite web |title=Attributes – D Programming Language |url=https://dlang.org/spec/attribute.html |website=dlang.org |access-date=2018-06-22 |archive-date=2018-12-08 |archive-url=https://web.archive.org/web/20181208115642/https://dlang.org/spec/attribute.html |url-status=live }}</ref> * In [[DIGITAL Command Language]], the @ character was the command used to execute a command procedure. To run the command procedure VMSINSTAL.COM, one would type <code>@VMSINSTAL</code> at the command prompt. * In the [[Domain Name System]] (DNS), @ is used to represent the {{code|$ORIGIN}}, typically the "root" of the domain without a prefixed sub-domain. (Ex: wikipedia.org vs. www.wikipedia.org) * In [[Forth (programming language)|Forth]], it is used to fetch values from the address on the top of the stack. The operator is pronounced as "fetch". * In [[Haskell]], it is used in so-called ''as-patterns''. This notation can be used to give aliases to [[pattern matching|patterns]], making them more readable. * in [[HTML]], it can be encoded as <code>&commat;</code><ref>{{cite web |url=https://dev.w3.org/html5/html-author/charref |title=Character Entity Reference Chart |date= |website=[[World Wide Web Consortium]] (W3C) |access-date=2022-02-08 |archive-date=2021-02-27 |archive-url=https://web.archive.org/web/20210227130216/https://dev.w3.org/html5/html-author/charref |url-status=live }}</ref> * In [[J (programming language)|J]], denotes [[function composition]]. * In [[Java (programming language)|Java]], it has been used to denote [[Java annotation|annotations]], a kind of metadata, since version 5.0.<ref>{{Cite web |title=in java what does the @ symbol mean? |url=https://stackoverflow.com/questions/31822020/in-java-what-does-the-symbol-mean |access-date=2020-04-30 |website=Stack Overflow |archive-date=2020-07-26 |archive-url=https://web.archive.org/web/20200726125845/https://stackoverflow.com/questions/31822020/in-java-what-does-the-symbol-mean |url-status=live }}</ref> * In [[Julia (programming language)|Julia]], it denotes the invocation of a macro.<ref>{{cite web |title=Metaprogramming · The Julia Language |url=https://docs.julialang.org/en/v1/manual/metaprogramming/#man-macros |website=docs.julialang.org |access-date=2023-08-23 |archive-date=2023-06-23 |archive-url=https://web.archive.org/web/20230623204719/https://docs.julialang.org/en/v1/manual/metaprogramming/ |url-status=live }}</ref> * In [[LiveCode]], it is prefixed to a parameter to indicate that the parameter is [[Pass by reference|passed by reference]]. * In an [[LXDE]] autostart file (as used, for example, on the [[Raspberry Pi]] computer), @ is prefixed to a command to indicate that the command should be automatically re-executed if it crashes.<ref>{{Cite web |title=LXSession - LXDE.org |url=https://wiki.lxde.org/en/LXSession#Settings |access-date=2020-04-30 |website=wiki.lxde.org |archive-date=2020-07-14 |archive-url=https://web.archive.org/web/20200714075921/https://wiki.lxde.org/en/LXSession#Settings |url-status=live }}</ref> * In a [[Makefile]], @ specifies to not output the command before it is executed. * In [[ML (programming language)|ML]], it denotes list concatenation. * In [[modal logic]], specifically when representing [[possible world]]s, @ is sometimes used as a logical symbol to denote the actual world (the world we are "at"). * In [[Objective-C]], @ is prefixed to language-specific keywords such as @implementation and to form string literals. * In InterSystems [[Caché ObjectScript|ObjectScript]], @ is the indirection operator, enabling dynamic runtime substitution of part or all of a command line, a command, or a command argument.<ref>{{Cite web |title=Indirection – InterSystems IRIS Documentation|url=https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_op_indirection|access-date=2025-01-31|website=docs.intersystems.com|language=en-us|url-status=live}}</ref> * In [[Pascal (programming language)|Pascal]], @ is the "address of" operator (it tells the location at which a variable is found). * In [[Perl]], @ prefixes [[Variable (programming)|variables]] which contain [[Array data structure|arrays]] {{code|@array}}, including array [[Array slicing#1987: Perl|slices]] {{code|@array[2..5,7,9]}} and [[Hash table#Associative arrays|hash]] slices {{code|@hash{'foo', 'bar', 'baz'}|perl}} or {{code|@hash{qw(foo bar baz)}|perl}}. This use is known as a ''[[Sigil (computer programming)|sigil]]''. * In [[PHP]], it is used just before an [[Expression (programming)|expression]] to make the [[Interpreter (computing)|interpreter]] suppress errors that would be generated from that expression.<ref>{{Cite web |title=PHP: Error Control Operators – Manual |url=https://www.php.net/manual/en/language.operators.errorcontrol.php |access-date=2020-04-30 |website=www.php.net |archive-date=2020-05-08 |archive-url=https://web.archive.org/web/20200508094533/https://www.php.net/manual/en/language.operators.errorcontrol.php |url-status=live }}</ref> * In [[Python (programming language)|Python]] 2.4 and up, it is used to [[Python syntax and semantics#Decorators|decorate a function]] (wrap the function in another one at creation time). In Python 3.5 and up, it is also used as an [[Overload (programming)|overloadable]] [[matrix multiplication]] operator.<ref>{{Cite web |title=syntax – What does the "at" (@) symbol do in Python? |url=https://stackoverflow.com/questions/6392739/what-does-the-at-symbol-do-in-python |access-date=2020-04-30 |website=Stack Overflow |archive-date=2020-04-24 |archive-url=https://web.archive.org/web/20200424180918/https://stackoverflow.com/questions/6392739/what-does-the-at-symbol-do-in-python |url-status=live }}</ref> *In [[R (programming language)|R]] and [[S-PLUS]], it is used to extract slots from S4 objects.<ref>{{Cite web |title= The S4 object system |url=http://adv-r.had.co.nz/S4.html |access-date=2023-08-18 |website=adv-r.had.co.nz/ |archive-date=2022-12-06 |archive-url=https://web.archive.org/web/20221206085835/http://adv-r.had.co.nz/S4.html |url-status=live }}</ref> *In [[ASP.NET Razor|Razor]], it is used for [[C Sharp (programming language)|C#]] code blocks.<ref>{{Cite web |title=Usage of the @ (at) sign in ASP.NET |url=https://www.mikesdotnetting.com/article/258/usage-of-the-at-sign-in-asp-net |access-date=2020-04-30 |website=www.mikesdotnetting.com |archive-date=2020-04-04 |archive-url=https://web.archive.org/web/20200404105645/http://www.mikesdotnetting.com/article/258/usage-of-the-at-sign-in-asp-net |url-status=live }}</ref> * In [[Ruby (programming language)|Ruby]], it functions as a sigil: <code>@</code> prefixes [[instance variable]]s, and <code>@@</code> prefixes [[class variable]]s.<ref>{{Cite web |title=syntax – What does @@variable mean in Ruby? |url=https://stackoverflow.com/questions/5890118/what-does-variable-mean-in-ruby |access-date=2020-05-05 |website=Stack Overflow |archive-date=2020-07-26 |archive-url=https://web.archive.org/web/20200726105629/https://stackoverflow.com/questions/5890118/what-does-variable-mean-in-ruby |url-status=live }}</ref> * In [[Rust (programming language)|Rust]], it is used to bind values matched by a pattern to a variable.<ref>{{cite web |title=Patterns |url=https://doc.rust-lang.org/reference/patterns.html#identifier-patterns |website=The Rust Reference |access-date=21 July 2023 |archive-url=https://web.archive.org/web/20230618030139/https://doc.rust-lang.org/reference/patterns.html#identifier-patterns |archive-date=18 June 2023 |url-status=live}}</ref> * In [[Scala (programming language)|Scala]], it is used to denote annotations (as in Java), and also to bind names to subpatterns in pattern-matching expressions.<ref>{{Cite web |title=Scala @ operator |url=https://stackoverflow.com/questions/2359014/scala-operator |access-date=2020-05-05 |website=Stack Overflow |archive-date=2020-07-26 |archive-url=https://web.archive.org/web/20200726112338/https://stackoverflow.com/questions/2359014/scala-operator |url-status=live }}</ref> * In [[Swift (programming language)|Swift]], <code>@</code> prefixes "annotations" that can be applied to classes or members. Annotations tell the compiler to apply special semantics to the declaration like keywords, without adding keywords to the language. * In [[T-SQL]], <code>@</code> prefixes variables and <code>@@</code> prefixes "niladic" system functions. * In several [[xBase]]-type programming languages, like [[DBASE]], [[FoxPro]]/[[Visual FoxPro]] and [[Clipper (programming language)|Clipper]], it is used to denote position on the screen. For example: {{code|@1,1 SAY "HELLO"|xbase}} to show the word "HELLO" in line 1, column 1. ** In FoxPro/Visual FoxPro, it is also used to indicate explicit [[pass by reference]] of variables when calling [[Subroutine|procedures or functions]] (but it is not an [[Memory address|address]] [[Operator (programming)|operator]]).<ref>{{Cite web |title=Visual FoxPro Programming Language Online Help: SET UDFPARMS (Command), or MSDN Library 'How to: Pass Data to Parameters by Reference'. |date=18 June 2008 |url=http://msdn.microsoft.com/en-us/library/z9b11381.aspx |access-date=2011-02-19 |publisher=Microsoft, Inc. |archive-date=2012-10-22 |archive-url=https://web.archive.org/web/20121022193155/http://msdn.microsoft.com/en-us/library/z9b11381.aspx |url-status=live }}</ref> * In a Windows [[Batch file]], an <code>@</code> at the start of a line suppresses the [[Echo (command)|echoing]] of that command. In other words, is the same as <code>ECHO OFF</code> applied to the current line only. Normally a Windows command is executed and takes effect from the next line onward, but <code>@</code> is a rare example of a command that takes effect immediately. It is most commonly used in the form {{code|@echo off}} which not only switches off echoing but prevents the command line itself from being echoed.<ref>{{Cite web |title=echo |url=https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/echo |website=docs.microsoft.com |access-date=2018-09-11 |archive-date=2018-09-11 |archive-url=https://web.archive.org/web/20180911191929/https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/echo |url-status=live }}</ref><ref>{{Cite web |title=Echo - Windows CMD - SS64.com |url=https://ss64.com/nt/echo.html |website=ss64.com |access-date=2018-09-11 |archive-date=2018-09-11 |archive-url=https://web.archive.org/web/20180911191818/https://ss64.com/nt/echo.html |url-status=live }}</ref> * In [[Windows PowerShell]], @ is used as array operator for array and hash table literals and for enclosing here-string literals.<ref>{{Cite web |title=Windows PowerShell Language Specification Version 3.0 |url=http://www.microsoft.com/en-us/download/details.aspx?id=36389 |website=Microsoft Download Center |access-date=2013-10-29 |archive-date=2022-01-26 |archive-url=https://web.archive.org/web/20220126032007/https://www.microsoft.com/en-us/download/details.aspx?id=36389 |url-status=live }}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)