string.expressions

Definition/BASIC Program, Releases: AP and R83

A string of characters.

Description

a string constant, a numeric constant, a variable with a string or numeric value, a substring, a concatenation of string expressions, an intrinsic function, or a format mask.

Concatenation of strings is specified by a colon (:) or by the 'cat' operator. The 'cat' operator must be preceded and followed by blanks.

The result of a string expression is an ASCII character string.

String expressions may include arithmetic expressions. The results of any numeric function or arithmetic expression is converted to an equivalent ASCII string.

Example

print 'the total amount is ' : amount
The string expression consists of a literal string, 'the total amount is
', followed by the contents of the variable 'amount'.

line = 'the total amount is ' : unit.price * quantity
The results of the arithmetic expression 'unit.price * quantity' is
converted to ASCII and concatenated to the literal string.

See Also

Command Name Type Description
basic.string.expression Definition An expression which evaluates to a string.
basic.logical.expressions Definition application of logical (Boolean) operators to relational or arithmetic expressions.
basic.arithmetic.expressions Definition Arithmetic expressions.
expression Definition Description of expression.
basic.count Function Counts number of occurences of a string within another string.
basic.: Relational Operator Concatenation operator.
basic.insert Function Inserts element into array.
basic.cat Relational Operator Concatenates string expressions.
basic.quotes Reserved Character String delimiter.

User Comments

What do you think?

Share your experience or ask a question by using the form below.

Login to leave your comments.