Formulas 1.3. String expressions

All the formulas whose outcome is a text are called string expressions. A string is programming jargon for a text; think of a text as a “string” of characters (letters).

Again, the outcomes of the following examples can be checked with the calculator.

"see" + "king"
concatenates two strings. Outcome: seeking.
left$ ("internationalization", 6)
computes the leftmost six letters of the string; the dollar sign is used for all functions whose result is a string. Outcome: intern.
mid$ ("internationalization", 6, 8)
computes the 8-letter substring that starts at the sixth letter of "internationalization". Outcome: national.
date$ ( )
computes the current date and time. Outcome at the time I am writing this: Mon Dec 2 02:23:45 2002.

Links to this page


© ppgb 20170916