EasyManua.ls Logo

HP 39gII - Page 283

HP 39gII
355 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Programming 273
String
commands
A string is a sequence of characters enclosed in double
quotes (""). To put a double quote in a string, use two
consecutive double quotes. The \ character starts an
"escape" sequence, and the character(s) immediately
following are interpreted specially. \n inserts a new line,
two backslashes insert a single backslash.
Example: PRINT("Hello\nWorld!") displays
Hello
World!
on the terminal.
+ Syntax: str1 + str2 or str1 + expression
Adds two strings together.
Example 1: "QUICK"+"DRAW" returns "QUICKDRAW"
Example 2: 32
X;"X = "+X returns "X = 32"
asc Syntax: asc(str)
Returns a vector containing the ASCII codes of string str.
Example: asc("AB") returns [65,66]
char Syntax: char(vector or int)
Returns the string corresponding to the character codes in
vector, or the single code int.
Examples: char(65) returns "A"; char([82,77,72])
returns "RMH"
dim Syntax: dim(str)
Returns the number of characters in string str.
Example: dim("12345") is 5, dim("""") and dim("\n")
are both 1 (notice the use of the two double quotes and
the escape sequence).
expr Syntax: expr(str)
Parses the string str into a number or expression.
Examples: expr("2+3") returns 5. If the variable X has
the value 90, then expr("X+10") returns 100. In a

Table of Contents

Other manuals for HP 39gII

Related product manuals