String Functions and Instructions in the CATALOG

Displaying String Functions and Instructions in the CATALOG

String functions and instructions are available only from the CATALOG. The table below lists the string functions and instructions in the order in which they appear among the other CATALOG menu items. The ellipses in the table indicate the presence of additional CATALOG items.

CATALOG

 

...

 

Equ4String(

Converts an equation to a string.

...

 

expr(

Converts a string to an expression.

...

 

inString(

Returns a character’s place number.

...

 

length(

Returns a string’s character length.

...

 

String4Equ(

Converts a string to an equation.

sub(

Returns a string subset as a string.

...

 

Concatenation

To concatenate two or more strings, follow these steps.

1. Enter string1, which can be a string or string name.
2. Press Ã.
3. Enter string2, which can be a string or string name. If necessary, press à and enter string3, and so on.

string1+string2+string3...

4. Press Í to display the strings as a single string.

Selecting a String Function from the CATALOG

To select a string function or instruction and paste it to the current screen, follow the steps for selecting an item from the CATALOG.

Equ4String(

Equ4String( converts an equation to a string. The equation must be store in a VARS Y‑VARS variable. Yn contains the equation. Strn (from Str1 to Str9, or Str0) is the string variable to which you want the equation to be stored.

Equ4String(Yn,Strn)

expr(

expr( converts the character string contained in string to an expression and executes the expression. string can be a string or a string variable.

expr(string)

inString(

inString( returns the character position in string of the first character of substring. string can be a string or a string variable. start is an optional character position at which to start the search; the default is 1.

inString(string,substring[,start])

Note: If string does not contain substring, or start is greater than the length of string, inString( returns 0.

length(

length( returns the number of characters in string. string can be a string or string variable.

Note: An instruction or function name, such as sin( or cos(, counts as one character.

length(string)

String4Equ(

String4Equ( converts string into an equation and stores the equation to Yn. string can be a string or string variable. String4Equ( is the inverse of Equ4String(.

String4Equ(string,Yn)

sub(

sub( returns a string that is a subset of an existing string. string can be a string or a string variable. begin is the position number of the first character of the subset. length is the number of characters in the subset.

sub(string,begin,length)

Entering a Function to Graph during Program Execution

In a program, you can enter a function to graph during program execution using these commands.

Note: When you execute this program, enter a function to store to Y3 at the ENTRY= prompt.