Lesson 04: Working With Strings

Strings are the literal ascii content of the variable whether numeric, alphabetic or special characters such as Unicode. The same variable may be used as both it’s numeric evaluation as well as it’s literal string content depending on the operation.

See: What is a string?

“three” and “3” are both strings but “3” may be  evaluated and converted in many ways such as the actual zeros and ones it takes to make the digital representation for calculation purposes; or an ascii numeric character with 3 points on the left  for printing. Note in the example below that the period (.) is used instead of the plus sign for combining the two string content values into one. See [[INITIALIZE]].

String variable computation example.

Outputs: this is the first string, this is the second string,

Create a node and paste this following code into it’s landing page editor. Goto the node’s address and test with browser.

[[INITIALIZE:var1|"this is the first string, "."this is the second string, "]]

Note: To bring variables within the string computations, add a dollar sign before each.

[[INITIALIZE:var1|"this is the first string, "]]
[[INITIALIZE:var2|"this is the second string, "]]

Leave a Reply