Skip to content
Tcl Source Code Artifact [bec2640abf]
Login

Artifact [bec2640abf]

Artifact bec2640abfeb7b908b5341c1da1af27800f7efbcdad58728889e03657c9c0673:


-- la valeur dit sa variante
B 5 : int, la plus stricte     1 value "5" names no variant of the sum B: a value of a sum is the name of its variant, then its value, as {i 5}, or {i:}5
B 2.5                          1 value "2.5" names no variant of the sum B: a value of a sum is the name of its variant, then its value, as {d 2.5}, or {d:}2.5
B abc                          1 value "abc" names no variant of the sum B: a value of a sum is the name of its variant, then its value, as {s abc}, or {s:}abc
A 5 : i et j                   1 value "5" names no variant of the sum A: a value of a sum is the name of its variant, then its value, as {i 5}, or {i:}5
C {1 2} : p et q               1 value "1 2" names no variant of the sum C: a value of a sum is the name of its variant, then its value, as {p {1 2}}, or {p:}{1 2}
W : variantes sans nom         1 variant 1 of the sum has no name: a sum writes the name of its variant in its value; name it ({int}name), or write a union with "|" if the value itself tells the alternatives apart
A en clair                     0 {j 5} A.j
A par la chaîne                0 A.j
A {j:}5                        0 A.j
A v(j) 5                       0 A.j
type cast A 5                  1 value "5" names no variant of the sum A: a value of a sum is the name of its variant, then its value, as {i 5}, or {i:}5
type cast A {j:}5              0 A.j
type cast B {s:}5              0 B.s
-- la variante survit
copie                          0 A.j
liste                          0 A.j A.i
liste nue                      1 value "7" names no variant of the sum A: a value of a sum is the name of its variant, then its value, as {i 7}, or {i:}7
lappend                        0 A.j
lappend nu                     1 value "3" names no variant of the sum A: a value of a sum is the name of its variant, then its value, as {i 3}, or {i:}3
produit                        0 {{j 5} 1} A.j
produit {a:}                   0 A.j
B {s:}5 dans une liste         0 B.s
-- modifications : la valeur garde ou change sa variante
set v 8                        1 value "8" names no variant of the sum A: a value of a sum is the name of its variant, then its value, as {i 8}, or {i:}8
incr v                         1 expected integer but got a list
set v(i) 8                     0 A.i
set v {A.i}8                   0 A.i
L(0) 4                         1 value "4" names no variant of the sum A: a value of a sum is the name of its variant, then its value, as {i 4}, or {i:}4
lset L 0 9                     1 value "9" names no variant of the sum A: a value of a sum is the name of its variant, then its value, as {i 9}, or {i:}9
r(a) 7                         1 value "7" names no variant of the sum A: a value of a sum is the name of its variant, then its value, as {i 7}, or {i:}7
r(n) 2                         0 A.j