Fields

Fields are Glee's way of naming and referencing Methods and Properties of Objects; "columns" of Record Sets; and symbols of Referenced Namespaces. The list of fields for each object is fluid and will continue to be as I gain experience in Glee coding. Thus, any programmatic reliance on fields will have to be flexible. All objects will support the :, :size, :string, :stringv, :typec, and  :typen ) fields. These fields report the field names; size of the object; object as a string; object as a verbose string; object type as character string; and object type as a number; respectively. This section illustrates fields for several objects and discusses some of the issues related to the use and behavior of fields.

Commentary Code Result
Commentary 123.4=>num; num: $; :, :alignn, :alignc, :size,
:string, :stringv, :typen, :typec
Commentary 'abc' => str; str: $; :, :b64, :csv, :hex, :num,
:props , :r64, :size, :string,
:stringV, :typeC, :typeN
Commentary "Hello"=>str;
'<1>: ' (str:size) $;
'<2>: ' (str:string) $;
'<3>: ' (str:stringv) $;
'<4>: ' (str :typen) $;
'<5>: ' (str :typec) $;
<1>: 37
<2>: Hello
<3>: String[R2C5:C]Hello
<4>: 28
<5>: String
Commentary '123.4 456'=> cnum ;
'<1>---------' $;
cnum:num %** $;
'<2>---------' $;
'abc'=> notnum; notnum:num %** $;
'<3>---------' $;
'':num %** $;
'<4>---------' $;
'123 abc 23.4'=> mix; mix:num %** $;
<1>---------
Num[R2C2:F]123.4 456
<2>---------
Num[R2C1:I]Nil
<3>---------
KNum[0]NULL
<4>---------
Num[R2C3:F]123 Nil 23.4
Commentary "a,b,c",(13 10 #asc),'d,e'=>str;
str:csv %** $;
Seq[I46R1C2T:Ptr]:
[1]Seq[I47R1C3T:Ptr]:
*[1]String[I48R1C1:Char]a
*[2]String[I49R1C1:Char]b
*[3]String[I50R1C2:Char]c
[2]Seq[I51R1C2T:Ptr]:
*[1]String[I52R1C1:Char]d
*[2]String[I53R1C1:Char]e
Commentary 'Hello',(13 10#asc),'World'=> str;
str:hex $;
Hello..World
466660056766
85CCFAD7F2C4
Commentary 'abc' 123=>seq; seq: $; :, :size , :sizes, :string,
:stringV, :typeC, :typesC,
:typeN, :typesN
Commentary 'abc' 123=>seq;
'<1>---------' $;
seq:size $;
'<2>---------' $;
seq %* %**$;
'<3>---------' $;
seq ,, %* $;
'<4>---------' $;
seq ,, '-' %* $;
'<5>---------' $;
seq %** $;
'<6>---------' $;
seq:typen $;
'<7>---------' $;
seq:typec $;
<1>---------
7
<2>---------
String[R1C6:C]abc123
<3>---------
abc 123
<4>---------
abc-123
<5>---------
Seq[R1C2:K]
[1]String[R2C3:C]abc
[2]Num[R2C1:I]123
<6>---------
26
<7>---------
Seq
Commentary #ns =>ns; ns: $; :, :clear, :fields, :names,
:size, :sizes, :string, :stringv,
:typec, :typen, :values
Commentary #ns => @ ;
10=>i;'abc'=>s;i s=>k;
"<1>============"$;
[] %** $;
"<2>============"$;
[]: $;
"<3>============"$;
'<3a>: ' ( []:size ) $;
'<3b>: ' ( []:typec ) $;
'<3c>: ' ( []:typen ) $;
'<3d>: ' ( []:names,, ) $;
'<3e>: ' ( []:sizes ) $;
'<3f>: ' ( []:values %** ) $;
"<4>============"$;
[] :stringv %** $;
"<5>============"$;
[] :stringv $;
<1>============
NS[R1C3:K]
Assoc[R2C1:P]:i:Num[1]
Assoc[R2C1:P]:s:String[3]
Assoc[R2C1:P]:k:Seq[2]
<2>============
:, :clear, :fields, :names, :size, :sizes, :string, :stringv, :typec, :typen, :values
<3>============
<3a>: 29
<3b>: NS
<3c>: 16
<3d>: i s k
<3e>: 4 3 7
<3f>: Seq[R2C3:K]
[1]Num[R3C1:I]10
[2]String[R3C3:C]abc
[3]Seq[R2C2:K]
*[1]Num[R3C1:I]10
*[2]String[R3C3:C]abc
<4>============
String[R2C85:C]NS[R1C3:K]
Assoc[R2C1:P]:i:Num[1]
Assoc[R2C1:P]:s:String[3]
Assoc[R2C1:P]:k:Seq[2]
<5>============
NS[R1C3:K]
Assoc[R2C1:P]:i:Num[1]
Assoc[R2C1:P]:s:String[3]
Assoc[R2C1:P]:k:Seq[2]