Simple Numeric Scalar Comments

General:This frame introduces you to simple characters in Glee.





Catenation: The comma (',') in Glee is the catenation operator. It glues things together. Here we glue the scalar 'a' to the scalar 'b' forming the vector (string) 'ab'. Pay close attention. The result is a single character vector formed from the catenation of the contents of the arguments. The next example looks like the same thing ... but it is very different.





Strand notation: Glee adopts strand notation (I don't know the source of the term) to create sequences of objects. Sequences are detailed in a later tutorial. The next example will detail the issues. But when sequences are displayed, the contents of the elements are displayed as catenations of characters. That's why this looks like catenation. The next example reveals what is really happening.





Sequence revealed: This example is identical to the previous example with one important difference. This example is preceeded with $V.
First I'll describe sequences (which are revealed here in the result). When Glee encounters hetrogeneous data (e.g. a string adjacent to a numeric vector; or a string adjacent to a string as we have here) then Glee creates a sequence. A sequence is a special kind of vector that contains pointers to objects. Viewing the result we see a sequence of two referents. The first referent ([1]String[I271R1C1:C]a) is to an object with a value of 'a'. The second element of the sequence ([2]String[I273R2C1:C]b) refers to an object with a value of 'b'. So you see, this is very different than catenation.

Now to the $V: The "$" character is kind of Glee's debugging delimiter. There is a special tutorial on them. $V means turn on the verbose display; $v means turn it off. On the Glee form there is a check box for verbosity. The $V manipulates that state as the program executes. This allows you to locally select debugging states. Glee adopts strand notation to create sequences of objects. Sequences are detailed in another tutorial.





Character delimiters:In Glee you can use the ( '  ') pair to delimit characters or you can use the ("  ") pair. This allows you to handle words like "Won't" or titles like ' "Gone With the Wind" '. However, you can't mix them. You can't do ( "help' ). Glee sees this as an unclosed delimitation of the string.






Character compare:Glee does simple string comparisons. When the strings are scalars, this is simple character comparison. Glee returns 1 where respective elements in strings match and 0 where they don't ... just like it does with numbers.