Working with Strings

A string in SPEL+ is a set of ASCII characters (Code &h01 to &hff) with a maximum length of 255.

You must declare strings in your programs with the String instruction.

All string variable names must end with a dollar sign ($) suffix.

The following table shows the string commands available in SPEL+.

Keyword Description
Asc Returns the decimal ASCII value of the first character in a string.
Chr$ Converts an ASCII value into a one character string.
FmtStr Formats a numerical or date/time expression.
FmtStr$ Formats a numerical or date/time expression.
Hex$ Returns a string containing the hexadecimal value of a number.
InStr Returns the position of a substring within a string.
LCase$ Returns the specified string in lower case characters.
Left$ Returns a substring beginning with the first character of a string.
Len Returns the length (number of characters) of a string.
LTrim$ Returns the specified string with left spaces removed.
Mid$ Returns a substring of a string.
ParseStr Parses a string into an array of tokens.
Right$ Returns a substring from the end of a string.
RTrim$ Returns the specified string with right spaces removed.
Space$ Returns a string containing a specified number of space (ASCII 32) characters.
Str$ Converts a number to a string.
String Declare a string variable in a program.
Tab$ Returns a tab string.
Trim$ Returns the specified string without spaces before or after.
UCase$ Returns the specified string in upper case characters.
Val Converts a string to a number.