Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,8 @@
# Creation of collections:
s := "abccd" # string, an ordered collection of characters, immutable
c := 'abcd' # cset, an unordered collection of characters, immutable
S := set() # set, an unordered collection of unique values, mutable, contents may be of any type
T := table() # table, an associative array of values accessed via unordered keys, mutable, contents may be of any type
L := [] # list, an ordered collection of values indexed by position 1..n or as stack/queue, mutable, contents may be of any type
record constructorname(field1,field2,fieldetc) # record, a collection of values stored in named fields, mutable, contents may be of any type (declare outside procedures)
R := constructorname() # record (creation)

View file

@ -0,0 +1,6 @@
s ||:= "xyz" # concatenation
c ++:= 'xyz' # union
insert(S,"abc") # insert
T["abc"] := "xyz" # insert create/overwrite
put(L,1) # put (extend), also push
R.field1 := "xyz" # overwrite

View file

@ -0,0 +1,4 @@
S := S ++ S2 # union of two sets or two csets
S ++:= S2 # augmented assignment
L := L ||| L2 # list concatenation
L |||:= L2 # augmented assignment