The characters list, The characters list ,23-3 – HP 50g Graphing Calculator User Manual

Page 759

Advertising
background image

Page 23-3

The operation of NUM, CHR, OBJ , and STR was presented earlier in this
Chapter. We have also seen the functions SUB and REPL in relation to graphics
earlier in this chapter. Functions SUB, REPL, POS, SIZE, HEAD, and TAIL have
similar effects as in lists, namely:

SIZE: number of a sub-string in a string (including spaces)
POS: position of first occurrence of a character in a string
HEAD: extracts first character in a string
TAIL: removes first character in a string
SUB: extract sub-string given starting and ending position
REPL: replace characters in a string with a sub-string starting at given position
SREPL: replaces a sub-string by another sub-string in a string

To see those effects on action try the following exercises: Store the string “

MY

NAME IS CYRILLE

” into variable S1. We’ll use this string to show examples of

the functions in the CHARS menu:

The characters list

The entire collection of characters available in the calculator is accessible
through the keystroke sequence ‚± When you highlight any character,
say they line feed character , you will see at the left side of the bottom of the

Advertising