Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

TEXTITEM$TEXTITEM$ returns a text item selected from the data Slot

Syntax

TEXTITEM$TEXTITEM$(ValExp)

Arguments

  • ValExp is a value expression containing an integer number.
  • Definition of TEXTITEM in the data slot of the expression the function is used in:
    TEXTITEMx TEXTITEMx=
    "
    "
    With for x a number which connect it to ValExp

...

  1. If ValExp is out of the range of TEXTITEM$ TEXTITEM$, "NullString" is returned.
  2. Please make sure that the delimiters you are using around your text item are different from the text you use inside the script!
  3. The text items should be stored in the data slot of the expression in which the TEXTITEM$ TEXTITEM$() function is used.
  4. The TEXTITEM definitions in the data slot may be delimited with quotes (") but also other characters may be used as long as the starting and ending is the same and is not used in the template itself. So if you want to use quotes in the content of a TEXTITEM you better use "|" as delimiter (see example)
  5. TEXTITEM$ TEXTITEM$ is very useful in combination with other functions to refer to fixed datasets (for instance series of coefficients etc.). Moreover, it is a very convenient way to combine it with the TEMPLATE$() function so you can write your templates in the dataslot of expression using the TEMPLATE$ function

...

For example, if the dataslot of expression:

H$ = TEXTITEM$ TEXTITEM$(Num)

contains the following items:

TEXTITEM0 TEXTITEM0 = "NullString"

TEXTITEM1 TEXTITEM1
"The ship is equiped with a diesel-electric propulsion system. 
"

TEXTITEM2 TEXTITEM2
"CPP propellors are installed. 
"

TEXTITEM3 TEXTITEM3
"Main particulars of the ship: 
LPP: 110 m 
B: 15 m 
T: 5 m 
"

TEXTITEM4 TEXTITEM4 = "The propeller diameter will be 3.5 m "

...

If you need to use quotes (") as content in the TEXTITEM, you shoud use another charater, i.e. one not used in the TEXTITEM itself, e.g. |.

So if you want to put a Telitab set in a TEXTITEM, you can do it as follows:

TEXTITEM1 TEXTITEM1


2 "XC" "YC" 
"1" 1 1 
"2" 2 4 
"3" 3 9 
"4" 4 16 
"5" 5 25 
"6" 6 36 
"7" 7 49 
"8" 8 64 
"9" 9 81 
"10" 10 100|

...