Special Characters
From CometWiki
(Difference between revisions)
(4 intermediate revisions not shown) | |||
Line 4: | Line 4: | ||
Character Description | Character Description | ||
- | ! Exclamation mark.<br> | + | ! Exclamation mark.<br/p> The comment character.<br/p> Allows comments to appear on source lines without being compiled into the object program. |
- | The comment character. Allows comments to appear on source lines without being compiled into the object program. | + | |
- | " or ' Double or single quotes.<br> Used to enclosed string constants (e.g., "YES", "QUIT", "SAVE").< | + | " or ' Double or single quotes.<br/p> Used to enclosed string constants (e.g., "YES", "QUIT", "SAVE").<br/p> These must be paired so that an opening double quote must be closed with a double quote (and same for single quotes).<br/p> Either type of quote may appear inside a pair of the other type (e.g., "IT'S TIME."). |
- | # Number sign (pound sign, "sharp" sign).< | + | # Number sign (pound sign, "sharp" sign).<br/p> Serves various purposes.<br/p> Used in edit masks.<br/p> Also used to specify the user record buffer in I/O statements. <br/p> Also is a compiler command that causes a form feed during compilation source printing. |
- | & Ampersand. Used to separate multiple statements on a single source line. | + | & Ampersand. <br/p> Used to separate multiple statements on a single source line. |
- | $ Dollar sign. Used as the ending character in string variable names. Also used as the leading character in an edit mask. | + | $ Dollar sign. <br/p> Used as the ending character in string variable names.<br/p> Also used as the leading character in an edit mask. |
- | ( ) Left and right parentheses. Used to enclosed various parameters in Internet Basic programs, including array subscripts and dimensions, function arguments, logical unit numbers, format labels (when referred to in executable statements), cursor position coordinates, algebraic expressions, and edit masks. Must be paired. | + | ( ) Left and right parentheses.<br/p> Used to enclosed various parameters in Internet Basic programs, including array subscripts and dimensions, function arguments, logical unit numbers, format labels (when referred to in executable statements), cursor position coordinates, algebraic expressions, and edit masks. Must be paired. |
- | * Asterisk. Used in numeric expressions to indicate multiplication. Also used in edit masks. Also used as a compiler command that flip-flops the printing of source lines during compilation. | + | * Asterisk.<br/p> Used in numeric expressions to indicate multiplication.<br/p> Also used in edit masks.<br/p> Also used as a compiler command that flip-flops the printing of source lines during compilation. |
- | + Plus sign. Used in numeric expression to indicate addition and in string expressions to indicate concatenation. Also used in edit masks. Also used as a compiler command that flip-flops object code printing during compilation. | + | + Plus sign.<br/p> Used in numeric expression to indicate addition and in string expressions to indicate concatenation.<br/p> Also used in edit masks.<br./p> Also used as a compiler command that flip-flops object code printing during compilation. |
- | , Comma. Used to separate parameters in Internet Basic statements. May be replaced with a blank space except in array references. Also used in edit masks. | + | , Comma.<br/p> Used to separate parameters in Internet Basic statements.<br/p> May be replaced with a blank space except in array references.<br/p> Also used in edit masks. |
- | - Minus sign. Used in numeric expressions to indicate subtraction. Also used in edit masks. | + | - Minus sign.<br/p> Used in numeric expressions to indicate subtraction.<br/p> Also used in edit masks. |
- | . Decimal point. Used in numeric constants to indicate position of the decimal point. Also used in edit masks. | + | . Decimal point.<br/p> Used in numeric constants to indicate position of the decimal point.<br/p> Also used in edit masks. |
- | / Slash. Used in numeric expressions to indicate division. | + | / Slash.<br/p> Used in numeric expressions to indicate division. |
- | ; Semicolon. Separates items in FORMAT statements and items in input/output statements. | + | ; Semicolon.<br/p> Separates items in FORMAT statements and items in input/output statements. |
- | = Equal sign. Used in LET statements to assign the results of an expression to a variable. Also used in relational operations to compare two values for equality. | + | = Equal sign.<br/p> Used in LET statements to assign the results of an expression to a variable.<br/p> Also used in relational operations to compare two values for equality. |
- | < Less than. Used in relational operations to compare two values. | + | < Less than.<br/p> Used in relational operations to compare two values. |
- | > Greater than. Used in relational operations to compare two values. | + | > Greater than.<br/p> Used in relational operations to compare two values. |
- | @ "At" sign. Used to specify cursor position or print position in FORMAT statements. Also used to enclose hex values (e.g., "@FF@"). | + | @ "At" sign.<br/p> Used to specify cursor position or print position in FORMAT statements.<br/p> Also used to enclose hex values (e.g., "@FF@"). <br/p> Starting with Build 292, "@" may also be used as an escape character within a string constant to facilitate using characters such as "@" and "_". |
- | Starting with Build 292, "@" may also be used as an escape character within a string constant to facilitate using characters such as "@" and "_". | + | |
''Examples:''' | ''Examples:''' | ||
Line 45: | Line 43: | ||
Print "Send e-mail to: support@@signature.net" | Print "Send e-mail to: support@@signature.net" | ||
- | _ Underline. Used for continuing an Internet Basic source statement to the following source line. | + | |
+ | _ Underline.<br/p> Used for continuing an Internet Basic source statement to the following source line. |
Latest revision as of 09:05, 31 May 2009
Special Characters
The following characters have specific meaning in Internet Basic source programs: Character Description
! Exclamation mark.
The comment character.
Allows comments to appear on source lines without being compiled into the object program.
" or ' Double or single quotes.
Used to enclosed string constants (e.g., "YES", "QUIT", "SAVE").
These must be paired so that an opening double quote must be closed with a double quote (and same for single quotes).
Either type of quote may appear inside a pair of the other type (e.g., "IT'S TIME.").
# Number sign (pound sign, "sharp" sign).
Serves various purposes.
Used in edit masks.
Also used to specify the user record buffer in I/O statements.
Also is a compiler command that causes a form feed during compilation source printing.
& Ampersand.
Used to separate multiple statements on a single source line.
$ Dollar sign.
Used as the ending character in string variable names.
Also used as the leading character in an edit mask.
( ) Left and right parentheses.
Used to enclosed various parameters in Internet Basic programs, including array subscripts and dimensions, function arguments, logical unit numbers, format labels (when referred to in executable statements), cursor position coordinates, algebraic expressions, and edit masks. Must be paired.
* Asterisk.
Used in numeric expressions to indicate multiplication.
Also used in edit masks.
Also used as a compiler command that flip-flops the printing of source lines during compilation.
+ Plus sign.
Used in numeric expression to indicate addition and in string expressions to indicate concatenation.
Also used in edit masks.
Also used as a compiler command that flip-flops object code printing during compilation.
, Comma.
Used to separate parameters in Internet Basic statements.
May be replaced with a blank space except in array references.
Also used in edit masks.
- Minus sign.
Used in numeric expressions to indicate subtraction.
Also used in edit masks.
. Decimal point.
Used in numeric constants to indicate position of the decimal point.
Also used in edit masks.
/ Slash.
Used in numeric expressions to indicate division.
; Semicolon.
Separates items in FORMAT statements and items in input/output statements.
= Equal sign.
Used in LET statements to assign the results of an expression to a variable.
Also used in relational operations to compare two values for equality.
< Less than.
Used in relational operations to compare two values.
> Greater than.
Used in relational operations to compare two values.
@ "At" sign.
Used to specify cursor position or print position in FORMAT statements.
Also used to enclose hex values (e.g., "@FF@").
Starting with Build 292, "@" may also be used as an escape character within a string constant to facilitate using characters such as "@" and "_".
Examples:'
A$ = "This is an underscore @_." Print "Send e-mail to: support@@signature.net"
_ Underline.
Used for continuing an Internet Basic source statement to the following source line.