The Adventure Programming Language (APL) borrows most of its features from BASIC and C and, to a lesser extent, Microsoft Macro Assembler (MASM). It is a line-oriented language with one command per line.
White Space
In APL, you can use white space (spaces and tabs) anywhere it makes sense. For example, you can indent your code however you want to, put spaces around arithmetic operators and after commas, and so on. When the syntax requires a space, you can use any number of spaces or tabs. White space is significant only to separate the things on either side of an operator. The only instance in which white space isn't allowed is inside quoted strings; that is, tabs and spaces included inside a quoted string are considered part of the string.
Case
In APL, all commands, variable references, and so on are not case sensitive.
Remarks in Code
APL supports two remark characters: the semicolon (;)and the apostrophe ('). Any line starting with a remark character or any part of a line after a remark character is a comment. The only exception is quoted strings: If a remark character appears inside a quoted string, it is just another character in the string and does not indicate a comment.
You can also specify remarks using the Rem command.
Hex Constants
In APL, numbers are normally expressed in decimal, but anywhere an integer argument is expected, a hexadecimal number can be given, using the C language “0x” prefix. For example, “0xFF00” specifies a bitmask of the high-order byte of a word. Real number arguments can be specified in hex using a decimal point, for example, “0x000F.F000” is 15.9375 (15 and fifteen-sixteenths).
Quoted Strings
Constant strings are specified with double quotation marks. All characters after an opening double quotation mark are part of the string until a closing double quotation mark is reached. A quoted string can't contain an end-of-line character. Two double quotation marks together in a quoted string are interpreted as one double quotation mark in the string. The case of letters is not changed inside quoted strings.
Degrees, Minutes, and Seconds
Often, some of the numbers in an APL program represent latitude and longitude coordinates. Because these coordinates are usually expressed in degrees, minutes, and seconds, and it is awkward to convert the minutes and seconds to fractional degrees, APL uses the colon (:) as a separator between degrees, minutes, and seconds. For example, 12:34:56.7 represents 12°34'56.7".
Boolean Constants
True and False are predefined constants equal to 1 and 0, respectively.