HP Prime Graphing NW280AAABA manual Commands under the Cmds menu Strings

Models: Prime Graphing NW280AAABA

1 616
Download 616 pages 24.49 Kb
Page 540
Image 540

Commands under the Cmds menu

Strings

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 and two backslashes insert a single backslash. To put a new line into the string, press Eto wrap the text at that point.

ASC Syntax: ASC (string)

Returns a list containing the ASCII codes of string.

Example: ASC("AB") returns [65,66]

CHAR Syntax: CHAR(vector) or CHAR(integer)

Returns the string corresponding to the character codes in vector, or the single code of integer.

Examples: CHAR(65) returns "A"

CHAR([82,77,72]) returns "RMH"

DIM Syntax: DIM(string)

Returns the number of characters in string.

Example: DIM("12345") returns 5, DIM("""") and DIM("\n") return 1. (Notice the use of the two double quotes and the escape sequence.)

534

Programming in HP PPL

Page 540
Image 540
HP Prime Graphing NW280AAABA manual Commands under the Cmds menu Strings, Char Syntax CHARvector or CHARinteger