Casio FX-CG10 Software User Guide - Page 309
Strings, Program, Function, Syntax, Description, StrCmp
View all Casio FX-CG10 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 309 highlights
k Strings A string is a series of characters enclosed in double quotes. In a program, strings are used to specify display text. A string made up of numbers (like "123") or an expression (like "x-1") cannot be processed as a calculation. To display a string at a specific location on the screen, use the Locate command (page 8-23). • To include double quotes (") or a backslash (\) in a string, put a backslash (\) in front of the double quotes (") or backslash (\). Example 1: To include Japan: "Tokyo" in a string "Japan:\"Tokyo\"" Example 2: To include main\abc in a string "main\\abc" You can input a backslash from the menu that appears when you press 6(CHAR) 2(SYMBOL) in the Program mode, or from the String category of the catalog that appears when you press !e(CATALOG). • You can assign strings to string memory (Str 1 through Str 20). For details about strings, see "String Memory" (page 2-8). • You can use the "+" command (page 8-27) to connect strings inside of an argument. • A function or command within a string function (Exp(, StrCmp(, etc.) is treated as a single character. For example, the "sin" function is treated as a single character. Exp( Function: Converts a string to an expression, and executes the expression. Syntax: Exp(""[)] Exp'Str( Function: Converts a graph expression to a string and assigns it to the specified variable. Syntax: Exp'Str(, [)] Description: A graph expression (Yn, r, Xt, Yt, X), recursion formula (an, an+1, an+2, bn, bn+1, bn+2, cn, cn+1, cn+2), or function memory (fn) can be used as the first argument (). StrCmp( Function: Compares "" and "" (character code comparison). Syntax: StrCmp("", ""[)] Description: Compares two strings and returns one of the following values. Returns 0 when "" = "". Returns 1 when "" > "". Returns -1 when "" < "". 8-25