The Syntax and Semantics of A+


The main purpose of this chapter is to describe the syntax of A+, but through a series of examples, rather than in a formal way. Consequently some commonly understood terms are used without being formally defined. In particular, the phrase A+ expression, or simply expression, is taken to have the same general meaning it does in mathematics, namely a well formed sentence that produces a value. In addition, some discussion of semantics has been included, but only where it seemed reasonable in order to complete a description. A brief discussion of well formed expressions is presented at the end of this section, after all the rules for the components of expressions have been presented.

Names and Symbols

   Primitive Function Symbols

A+ uses a mathematical symbol set to denote the functions that are native to the language, which are called primitive functions. This symbol set, part of the APL character set, consists of common mathematical symbols such as + and «, commonly used punctuation symbols, and specialized symbols such as Ù and Õ. In some cases it takes more than one symbol to represent a primitive function, as in +/, but the meaning can be deduced from the individual symbols. The symbols are listed in the table "Primitive Function and Operator Names and References".

Two of the symbols can be used alone, viz., û and ý. If the execution of a function or operator has been suspended, they mean resume execution (with increased workspace size if necessary) and abandon execution, respectively; in the absence of a suspension, they are ignored. Instead of ý, a dollar sign ($) can be used. Inside a function definition, an expression can consist of the symbol û alone, but it will be ignored, and the parser rejects ý alone as a token error.

   User Names

User names fall into two categories, unqualified and qualified. An unqualified name is made up of alphanumeric (alphabetic and numeric) characters and underbars (_). The first character must be alphabetic. For example, a, a1c, and a_1c are unqualified names, but 3xy and _xy are not. (Although underbar is currently permitted as the first character in user names, this manual has been written as if it were not, and you should consider this form reserved for system names and avoid it.) The identifying words in control statements (case, do, else, if, while) are reserved by A+ for that use; they cannot appear as user names, even in qualified names.

A qualified name is either an unqualified user name preceded by a dot (.), or a pair of unqualified user names separated by a dot. In either case there are no intervening blanks. For example, .xw1 and w_2.r2_a are qualified user names. An unqualified name preceding the dot in a qualified name is the name of a context. If there is a dot but no preceding name, the context is the root context.

   System Names

System function names are unqualified names preceded by an underbar, with no intervening spaces, _argv for instance. The use of system function names is reserved by A+.

The name of an object traditionally (and therefore in A+) called a system variable is an unqualified name preceded by a backquote, with no intervening spaces. For example, `rl is the name of the system variable called Random Link. These objects cannot be dealt with directly in A+, but only through certain system and primitive functions and system commands, to which they act as parameters. As indicated in "Symbols and Symbol Constants", they look just like symbols (and may be considered such). They are not, however, the symbol forms of names: A+ will not recognize rl, for instance, as having anything to do with `rl; the quoted form 'rl', however, is recognized by system functions such as _gsv.

   System Command Names

System command names begin with a dollar sign, followed immediately by an unqualified name, which is the name of the command. The name is sometimes followed by a space and then by a sequence of characters whose meaning is specific to the command, usually separated from the name by a space.

Comments

Comments can appear either alone on a line or to the right of an expression. A comment is indicated by the ã symbol (usually called "lamp," since it looks like a bulb filament and since comments illuminate code), and it and everything to its right on the line constitute the comment. For example:
     a+b  ã This is the A+ notation for addition.

Infix Notation and Ambi-valence

A+ is a mathematical notation, and as such uses infix notation for primitive functions with two arguments. In infix notation, the symbol or user name for a function with two arguments appears between them. For example, a+b denotes addition, a-b subtraction, a«b multiplication, and aßb division.

In mathematics, the symbol - can also be used with one argument, as in -b, in which case it denotes negation. This is true in A+ as well. Because the symbol denotes two functions, one with one argument and the other with two, it is called ambi-valent (e.g., it uses "both valences"). A+ has extended the idea of ambi-valence to most of its primitive functions. For example, just as -b denotes the negative of b, so ßb denotes the reciprocal of b.

Defined functions cannot be ambi-valent.

Functions with one argument are called monadic, and functions with two arguments are called dyadic. One often speaks of the monadic use or dyadic use of an ambi-valent primitive function symbol.

Syntactic Classes

   Numeric Constants

Individual numbers can be expressed in the usual integer, decimal, and exponential formats, with one exception: negative number constants begin with a "high minus" sign (¢) - including ¢Inf, which we will come to later - instead of the more conventional minus sign (-), although negative exponents in the exponential format are denoted by the conventional minus sign.

Exponential format is of the form 1.23e5, meaning 1.23 times 10 to the power 5, ¢5e2, meaning -500, and 1e-2, meaning .01. Only numbers can appear around the e. The one following it must be an integer - no decimal point - and have a regular minus sign if negative: a high minus there elicits a parse error report. A negative number before the e must have a high minus: a regular minus is considered to lie outside the format.

It is also possible to express a list of numbers as a constant, simply by separating the individual numbers by one or more blank spaces. For example:

 1.23 ¢7 45 3e-5
is a numeric constant with four numbers: 1.23, negative 7, 45, and .00003. Inf can appear in such a list. If you omit the blanks, A+ will give you a numeric vector, but probably not the one you intended. If a number is being parsed and a character is encountered that can't be part of the number, then a new number is started if the character could begin a number. For instance,
1e-3.5 40.358.62.7 is read by A+ as 0.001 0.5 40.358 0.62 0.7 .

   Character Constants

A character constant is expressed as a list of characters surrounded by a pair of single quote marks or a pair of double quote marks. For a quote mark of the same kind as the surrounding quote marks to be included in a list of characters, it must be doubled. For example, both 'abc''d' and "abc'd" are constant expressions for the list of characters abc'd. There is, however, a distinction between the two kinds of quotation marks.

Within single quotes (') the C escape sequences and indeed any \c are not treated in any way, but left as is.

In strings contained within double quotes (") these sequences and \c are treated as follows:

These sequences and their translations are (where parenthesis indicates that A+ does not perform the substitution that the parenthesized term implies):

Double-Quote Translations
NameStringTranslationComment
newline\nnewline character 
(horizontal tab)\ttfor tab use "\11"
(vertical tab)\vv 
(backspace)\bbfor backspace use "\10"
(carriage return)\rrfor carriage return use "\15"
(formfeed)\fffor formfeed use "\14"
(audible alert)\aa 
backslash\\\ 
question mark\?? 
single quote\'' 
double quote\"" 
octal number\oooa charactersee below "\10"xample, `rl is the name of the system variable called Random Link. These objects cannot be dealt with directly in A+, but only through certain system and primitive functions and system commands, to which they act as parameters. As indicated in "Symbols and Symbol Constants", they look just like symbols (and may be considered such). They are not, however, the symbol forms of names: A+ will not recognize rl, for instance, as having anything to do with `rl; the quoted form 'rl', however, is recognized by system functions such as _gsv.

   System Command Names

System command names begin with a dollar sign, followed immediately by an unqualified name, which is the name of the command. The name is sometimes followed by a space and then by a sequence of characters whose meaning is specific to the command, usually separated from the name by a space.

Comments

Comments can appear either alone on a line or to the right of an expression. A comment is indicated by the ã symbol (usually called "lamp," since it looks like a bulb filament and since comments illuminate code), and it and everything to its right on the line constitute the comment. For example:
     a+b  ã This is the A+ notation for addition.

Infix Notation and Ambi-valence

A+ is a mathematical notation, and as such uses infix notation for primitive functions with two arguments. In infix notation, the symbol or user name for a function with two arguments appears between them. For example, a+b denotes addition, a-b subtraction, a«b multiplication, and aßb division.

In mathematics, the symbol - can also be used with one argument, as in -b, in which case it denotes negation. This is true in A+ as well. Because the symbol denotes two functions, one with one argument and the other with two, it is called ambi-valent (e.g., it uses "both valences"). A+ has extended the idea of ambi-valence to most of its primitive functions. For example, just as -b denotes the negative of b, so ßb denotes the reciprocal of b.

Defined functions cannot be ambi-valent.

Functions with one argument are called monadic, and functions with two arguments are called dyadic. One often speaks of the monadic use or dyadic use of an ambi-valent primitive function symbol.

Syntactic Classes

   Numeric Constants

Individual numbers can be expressed in the usual integer, decimal, and exponential formats, with one exception: negative number constants begin with a "high minus" sign (¢) - including ¢Inf, which we will come to later - instead of the more conventional minus sign (-), although negative exponents in the exponential format are denoted by the conventional minus sign.

Exponential format is of the form 1.23e5, meaning 1.23 times 10 to the power 5, ¢5e2, meaning -500, and 1e-2, meaning .01. Only numbers can appear around the e. The one following it must be an integer - no decimal point - and have a regular minus sign if negative: a high minus there elicits a parse error report. A negative number before the e must have a high minus: a regular minus is considered to lie outside the format.

It is also possible to express a list of numbers as a constant, simply by separating the individual numbers by one or more blank spaces. For example:

 1.23 ¢7 45 3e-5
is a numeric constant with four numbers: 1.23, negative 7, 45, and .00003. Inf can appear in such a list. If you omit the blanks, A+ will give you a numeric vector, but probably not the one you intended. If a number is being parsed and a character is encountered that can't be part of the number, then a new number is started if the character could begin a number. For instance,
1e-3.5 40.358.62.7 is read by A+ as 0.001 0.5 40.358 0.62 0.7 .

   Character Constants

A character constant is expressed as a list of characters surrounded by a pair of single quote marks or a pair of double quote marks. For a quote mark of the same kind as the surrounding quote marks to be included in a list of characters, it must be doubled. For example, both 'abc''d' and "abc'd" are constant expressions for the list of characters abc'd. There is, however, a distinction between the two kinds of quotation marks.

Within single quotes (') the C escape sequences and indeed any \c are not treated in any way, but left as is.

In strings contained within double quotes (") these sequences and \c are treated as follows:

These sequences and their translations are (where parenthesis indicates that A+ does not perform the substitution that the parenthesized term implies):

Double-Quote Translations
NameStringTranslationComment
newline\nnewline character 
(horizontal tab)\ttfor tab use "\11"
(vertical tab)\vv 
(backspace)\bbfor backspace use "\10"
(carriage return)\rrfor carriage return use "\15"
(formfeed)\fffor formfeed use "\14"
(audible alert)\aa 
backslash\\\ 
question mark\?? 
single quote\'' 
double quote\"" 
octal number\oooa charactersee below "\10"xample, `rl is the name of the system variable called Random Link. These objects cannot be dealt with directly in A+, but only through certain system and primitive functions and system commands, to which they act as parameters. As indicated in "Symbols and Symbol Constants", they look just like symbols (and may be considered such). They are not, however, the symbol forms of names: A+ will not recognize rl, for instance, as having anything to do with `rl; the quoted form 'rl', however, is recognized by system functions such as _gsv.

   System Command Names

System command names begin with a dollar sign, followed immediately by an unqualified name, which is the name of the command. The name is sometimes followed by a space and then by a sequence of characters whose meaning is specific to the command, usually separated from the name by a space.

Comments

Comments can appear either alone on a line or to the right of an expression. A comment is indicated by the ã symbol (usually called "lamp," since it looks like a bulb filament and since comments illuminate code), and it and everything to its right on the line constitute the comment. For example:
     a+b  ã This is the A+ notation for addition.

Infix Notation and Ambi-valence

A+ is a mathematical notation, and as such uses infix notation for primitive functions with two arguments. In infix notation, the symbol or user name for a function with two arguments appears between them. For example, a+b denotes addition, a-b subtraction, a«b multiplication, and aßb division.

In mathematics, the symbol - can also be used with one argument, as in -b, in which case it denotes negation. This is true in A+ as well. Because the symbol denotes two functions, one with one argument and the other with two, it is called ambi-valent (e.g., it uses "both valences"). A+ has extended the idea of ambi-valence to most of its primitive functions. For example, just as -b denotes the negative of b, so ßb denotes the reciprocal of b.

Defined functions cannot be ambi-valent.

Functions with one argument are called monadic, and functions with two arguments are called dyadic. One often speaks of the monadic use or dyadic use of an ambi-valent primitive function symbol.

Syntactic Classes

   Numeric Constants

Individual numbers can be expressed in the usual integer, decimal, and exponential formats, with one exception: negative number constants begin with a "high minus" sign (¢) - including ¢Inf, which we will come to later - instead of the more conventional minus sign (-), although negative exponents in the exponential format are denoted by the conventional minus sign.

Exponential format is of the form 1.23e5, meaning 1.23 times 10 to the power 5, ¢5e2, meaning -500, and 1e-2, meaning .01. Only numbers can appear around the e. The one following it must be an integer - no decimal point - and have a regular minus sign if negative: a high minus there elicits a parse error report. A negative number before the e must have a high minus: a regular minus is considered to lie outside the format.

It is also possible to express a list of numbers as a constant, simply by separating the individual numbers by one or more blank spaces. For example:

 1.23 ¢7 45 3e-5
is a numeric constant with four numbers: 1.23, negative 7, 45, and .00003. Inf can appear in such a list. If you omit the blanks, A+ will give you a numeric vector, but probably not the one you intended. If a number is being parsed and a character is encountered that can't be part of the number, then a new number is started if the character could begin a number. For instance,
1e-3.5 40.358.62.7 is read by A+ as 0.001 0.5 40.358 0.62 0.7 .

   Character Constants

A character constant is expressed as a list of characters surrounded by a pair of single quote marks or a pair of double quote marks. For a quote mark of the same kind as the surrounding quote marks to be included in a list of characters, it must be doubled. For example, both 'abc''d' and "abc'd" are constant expressions for the list of characters abc'd. There is, however, a distinction between the two kinds of quotation marks.

Within single quotes (') the C escape sequences and indeed any \c are not treated in any way, but left as is.

In strings contained within double quotes (") these sequences and \c are treated as follows:

These sequences and their translations are (where parenthesis indicates that A+ does not perform the substitution that the parenthesized term implies):

Double-Quote Translations
NameStringTranslationComment
newline\nnewline character 
(horizontal tab)\ttfor tab use "\11"
(vertical tab)\vv 
(backspace)\bbfor backspace use "\10"
(carriage return)\rrfor carriage return use "\15"
(formfeed)\fffor formfeed use "\14"
(audible alert)\aa 
backslash\\\ 
question mark\?? 
single quote\'' 
double quote\"" 
octal number\oooa charactersee below "\10"xample, `rl is the name of the system variable called Random Link. These objects cannot be dealt with directly in A+, but only through certain system and primitive functions and system commands, to which they act as parameters. As indicated in "Symbols and Symbol Constants", they look just like symbols (and may be considered such). They are not, however, the symbol forms of names: A+ will not recognize rl, for instance, as having anything to do with `rl; the quoted form 'rl', however, is recognized by system functions such as _gsv.

   System Command Names

System command names begin with a dollar sign, followed immediately by an unqualified name, which is the name of the command. The name is sometimes followed by a space and then by a sequence of characters whose meaning is specific to the command, usually separated from the name by a space.

Comments

Comments can appear either alone on a line or to the right of an expression. A comment is indicated by the ã symbol (usually called "lamp," since it looks like a bulb filament and since comments illuminate code), and it and everything to its right on the line constitute the comment. For example:
     a+b  ã This is the A+ notation for addition.

Infix Notation and Ambi-valence

A+ is a mathematical notation, and as such uses infix notation for primitive functions with two arguments. In infix notation, the symbol or user name for a function with two arguments appears between them. For example, a+b denotes addition, a-b subtraction, a«b multiplication, and aßb division.

In mathematics, the symbol - can also be used with one argument, as in -b, in which case it denotes negation. This is true in A+ as well. Because the symbol denotes two functions, one with one argument and the other with two, it is called ambi-valent (e.g., it uses "both valences"). A+ has extended the idea of ambi-valence to most of its primitive functions. For example, just as -b denotes the negative of b, so ßb denotes the reciprocal of b.

Defined functions cannot be ambi-valent.

Functions with one argument are called monadic, and functions with two arguments are called dyadic. One often speaks of the monadic use or dyadic use of an ambi-valent primitive function symbol.

Syntactic Classes

   Numeric Constants

Individual numbers can be expressed in the usual integer, decimal, and exponential formats, with one exception: negative number constants begin with a "high minus" sign (¢) - including ¢Inf, which we will come to later - instead of the more conventional minus sign (-), although negative exponents in the exponential format are denoted by the conventional minus sign.

Exponential format is of the form 1.23e5, meaning 1.23 times 10 to the power 5, ¢5e2, meaning -500, and 1e-2, meaning .01. Only numbers can appear around the e. The one following it must be an integer - no decimal point - and have a regular minus sign if negative: a high minus there elicits a parse error report. A negative number before the e must have a high minus: a regular minus is considered to lie outside the format.

It is also possible to express a list of numbers as a constant, simply by separating the individual numbers by one or more blank spaces. For example:

 1.23 ¢7 45 3e-5
is a numeric constant with four numbers: 1.23, negative 7, 45, and .00003. Inf can appear in such a list. If you omit the blanks, A+ will give you a numeric vector, but probably not the one you intended. If a number is being parsed and a character is encountered that can't be part of the number, then a new number is started if the character could begin a number. For instance,
1e-3.5 40.358.62.7 is read by A+ as 0.001 0.5 40.358 0.62 0.7 .

   Character Constants

A character constant is expressed as a list of characters surrounded by a pair of single quote marks or a pair of double quote marks. For a quote mark of the same kind as the surrounding quote marks to be included in a list of characters, it must be doubled. For example, both 'abc''d' and "abc'd" are constant expressions for the list of characters abc'd. There is, however, a distinction between the two kinds of quotation marks.

Within single quotes (') the C escape sequences and indeed any \c are not treated in any way, but left as is.

In strings contained within double quotes (") these sequences and \c are treated as follows:

These sequences and their translations are (where parenthesis indicates that A+ does not perform the substitution that the parenthesized term implies):

Double-Quote Translations
NameStringTranslationComment
newline\nnewline character 
(horizontal tab)\ttfor tab use "\11"
(vertical tab)\vv 
(backspace)\bbfor backspace use "\10"
(carriage return)\rrfor carriage return use "\15"
(formfeed)\fffor formfeed use "\14"
(audible alert)\aa 
backslash\\\ 
question mark\?? 
single quote\'' 
double quote\"" 
octal number\oooa charactersee below "\10"xample, `rl is the name of the system variable called Random Link. These objects cannot be dealt with directly in A+, but only through certain system and primitive functions and system commands, to which they act as parameters. As indicated in "Symbols and Symbol Constants", they look just like symbols (and may be considered such). They are not, however, the symbol forms of names: A+ will not recognize rl, for instance, as having anything to do with `rl; the quoted form 'rl', however, is recognized by system functions such as _gsv.

   System Command Names

System command names begin with a dollar sign, followed immediately by an unqualified name, which is the name of the command. The name is sometimes followed by a space and then by a sequence of characters whose meaning is specific to the command, usually separated from the name by a space.

Comments

Comments can appear either alone on a line or to the right of an expression. A comment is indicated by the ã symbol (usually called "lamp," since it looks like a bulb filament and since comments illuminate code), and it and everything to its right on the line constitute the comment. For example:
     a+b  ã This is the A+ notation for addition.

Infix Notation and Ambi-valence

A+ is a mathematical notation, and as such uses infix notation for primitive functions with two arguments. In infix notation, the symbol or user name for a function with two arguments appears between them. For example, a+b denotes addition, a-b subtraction, a«b multiplication, and aßb division.

In mathematics, the symbol - can also be used with one argument, as in -b, in which case it denotes negation. This is true in A+ as well. Because the symbol denotes two functions, one with one argument and the other with two, it is called ambi-valent (e.g., it uses "both valences"). A+ has extended the idea of ambi-valence to most of its primitive functions. For example, just as -b denotes the negative of b, so ßb denotes the reciprocal of b.

Defined functions cannot be ambi-valent.

Functions with one argument are called monadic, and functions with two arguments are called dyadic. One often speaks of the monadic use or dyadic use of an ambi-valent primitive function symbol.

Syntactic Classes

   Numeric Constants

Individual numbers can be expressed in the usual integer, decimal, and exponential formats, with one exception: negative number constants begin with a "high minus" sign (¢) - including ¢Inf, which we will come to later - instead of the more conventional minus sign (-), although negative exponents in the exponential format are denoted by the conventional minus sign.

Exponential format is of the form 1.23e5, meaning 1.23 times 10 to the power 5, ¢5e2, meaning -500, and 1e-2, meaning .01. Only numbers can appear around the e. The one following it must be an integer - no decimal point - and have a regular minus sign if negative: a high minus there elicits a parse error report. A negative number before the e must have a high minus: a regular minus is considered to lie outside the format.

It is also possible to express a list of numbers as a constant, simply by separating the individual numbers by one or more blank spaces. For example:

 1.23 ¢7 45 3e-5
is a numeric constant with four numbers: 1.23, negative 7, 45, and .00003. Inf can appear in such a list. If you omit the blanks, A+ will give you a numeric vector, but probably not the one you intended. If a number is being parsed and a character is encountered that can't be part of the number, then a new number is started if the character could begin a number. For instance,
1e-3.5 40.358.62.7 is read by A+ as 0.001 0.5 40.358 0.62 0.7 .

   Character Constants

A character constant is expressed as a list of characters surrounded by a pair of single quote marks or a pair of double quote marks. For a quote mark of the same kind as the surrounding quote marks to be included in a list of characters, it must be doubled. For example, both 'abc''d' and "abc'd" are constant expressions for the list of characters abc'd. There is, however, a distinction between the two kinds of quotation marks.

Within single quotes (') the C escape sequences and indeed any \c are not treated in any way, but left as is.

In strings contained within double quotes (") these sequences and \c are treated as follows:

These sequences and their translations are (where parenthesis indicates that A+ does not perform the substitution that the parenthesized term implies):

Double-Quote Translations
NameStringTranslationComment
newline\nnewline character 
(horizontal tab)\ttfor tab use "\11"
(vertical tab)\vv 
(backspace)\bbfor backspace use "\10"
(carriage return)\rrfor carriage return use "\15"
(formfeed)\fffor formfeed use "\14"
(audible alert)\aa 
backslash\\\ 
question mark\?? 
single quote\'' 
double quote\"" 
octal number\oooa charactersee below "\10"xample, `rl is the name of the system variable called Random Link. These objects cannot be dealt with directly in A+, but only through certain system and primitive functions and system commands, to which they act as parameters. As indicated in "Symbols and Symbol Constants", they look just like symbols (and may be considered such). They are not, however, the symbol forms of names: A+ will not recognize rl, for instance, as having anything to do with `rl; the quoted form 'rl', however, is recognized by system functions such as _gsv.

   System Command Names

System command names begin with a dollar sign, followed immediately by an unqualified name, which is the name of the command. The name is sometimes followed by a space and then by a sequence of characters whose meaning is specific to the command, usually separated from the name by a space.

Comments

Comments can appear either alone on a line or to the right of an expression. A comment is indicated by the ã symbol (usually called "lamp," since it looks like a bulb filament and since comments illuminate code), and it and everything to its right on the line constitute the comment. For example:
     a+b  ã This is the A+ notation for addition.

Infix Notation and Ambi-valence

A+ is a mathematical notation, and as such uses infix notation for primitive functions with two arguments. In infix notation, the symbol or user name for a function with two arguments appears between them. For example, a+b denotes addition, a-b subtraction, a«b multiplication, and aßb division.

In mathematics, the symbol - can also be used with one argument, as in -b, in which case it denotes negation. This is true in A+ as well. Because the symbol denotes two functions, one with one argument and the other with two, it is called ambi-valent (e.g., it uses "both valences"). A+ has extended the idea of ambi-valence to most of its primitive functions. For example, just as -b denotes the negative of b, so ßb denotes the reciprocal of b.

Defined functions cannot be ambi-valent.

Functions with one argument are called monadic, and functions with two arguments are called dyadic. One often speaks of the monadic use or dyadic use of an ambi-valent primitive function symbol.

Syntactic Classes

   Numeric Constants

Individual numbers can be expressed in the usual integer, decimal, and exponential formats, with one exception: negative number constants begin with a "high minus" sign (¢) - including ¢Inf, which we will come to later - instead of the more conventional minus sign (-), although negative exponents in the exponential format are denoted by the conventional minus sign.

Exponential format is of the form 1.23e5, meaning 1.23 times 10 to the power 5, ¢5e2, meaning -500, and 1e-2, meaning .01. Only numbers can appear around the e. The one following it must be an integer - no decimal point - and have a regular minus sign if negative: a high minus there elicits a parse error report. A negative number before the e must have a high minus: a regular minus is considered to lie outside the format.

It is also possible to express a list of numbers as a constant, simply by separating the individual numbers by one or more blank spaces. For example:

 1.23 ¢7 45 3e-5
is a numeric constant with four numbers: 1.23, negative 7, 45, and .00003. Inf can appear in such a list. If you omit the blanks, A+ will give you a numeric vector, but probably not the one you intended. If a number is being parsed and a character is encountered that can't be part of the number, then a new number is started if the character could begin a number. For instance,
1e-3.5 40.358.62.7 is read by A+ as 0.001 0.5 40.358 0.62 0.7 .

   Character Constants

A character constant is expressed as a list of characters surrounded by a pair of single quote marks or a pair of double quote marks. For a quote mark of the same kind as the surrounding quote marks to be included in a list of characters, it must be doubled. For example, both 'abc''d' and "abc'd" are constant expressions for the list of characters abc'd. There is, however, a distinction between the two kinds of quotation marks.

Within single quotes (') the C escape sequences and indeed any \c are not treated in any way, but left as is.

In strings contained within double quotes (") these sequences and \c are treated as follows:

These sequences and their translations are (where parenthesis indicates that A+ does not perform the substitution that the parenthesized term implies):

Double-Quote Translations
NameStringTranslationComment
newline\nnewline character 
(horizontal tab)\ttfor tab use "\11"
(vertical tab)\vv 
(backspace)\bbfor backspace use "\10"
(carriage return)\rrfor carriage return use "\15"
(formfeed)\fffor formfeed use "\14"
(audible alert)\aa 
backslash\\\ 
question mark\?? 
single quote\'' 
double quote\"" 
octal number\oooa charactersee below "\10"xample, `rl is the name of the system variable called Random Link. These objects cannot be dealt with directly in A+, but only through certain system and primitive functions and system commands, to which they act as parameters. As indicated in "Symbols and Symbol Constants", they look just like symbols (and may be considered such). They are not, however, the symbol forms of names: A+ will not recognize rl, for instance, as having anything to do with `rl; the quoted form 'rl', however, is recognized by system functions such as _gsv.

   System Command Names

System command names begin with a dollar sign, followed immediately by an unqualified name, which is the name of the command. The name is sometimes followed by a space and then by a sequence of characters whose meaning is specific to the command, usually separated from the name by a space.

Comments

Comments can appear either alone on a line or to the right of an expression. A comment is indicated by the ã symbol (usually called "lamp," since it looks like a bulb filament and since comments illuminate code), and it and everything to its right on the line constitute the comment. For example:
     a+b  ã This is the A+ notation for addition.

Infix Notation and Ambi-valence

A+ is a mathematical notation, and as such uses infix notation for primitive functions with two arguments. In infix notation, the symbol or user name for a function with two arguments appears between them. For example, a+b denotes addition, a-b subtraction, a«b multiplication, and aßb division.

In mathematics, the symbol - can also be used with one argument, as in -b, in which case it denotes negation. This is true in A+ as we