
6. The SPEL+ Language
6.8 Working with strings
A string in SPEL
+
is a set of ASCII characters 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.
You can declare string arrays with up to three dimensions.
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.
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.
Trim$
Returns the specified string with left and right spaces removed.
UCase$
Returns the specified string in upper case characters.
Val
Converts a string to a number.
EPSON RC+ 5.0 (Ver.5.4) User's Guide Rev.4 157
Comentarios a estos manuales