Skip to content
Tcl Source Code Artifact [bafa69aa5a]
Login

Artifact [bafa69aa5a]

Artifact bafa69aa5aef583398dadfc75ddb6d8de05b53e28912f539b8657d9390c5b4bc:


--- plus de cast immédiat (v16m)
catch {concat {int}$s} r: 0 3.0
s = 3: 3 {} int
double typé -> int: 3.0 double int
{int}${s}: 4 {} int
nom inconnu : note: 3.0 {} zz
{}$d retire le type: 3.0 {} {}
commande : pas de cast ici: 3 int
dans une procédure: 0 abc
--- étiquettes de champ
littérales: jean 12
substituées: ana 30
ordre libre, défaut: zoe 0
compilé: bob 40
à travers une commande: jo 3
ancienne écriture: ERREUR {nom} is not a type: to name the field "nom" of paire, write {/nom}
étiquette inconnue: ERREUR unknown field "taille" in paire
type global age : aucun conflit: int
{age} est le type age: 12 {} age
--- étiquettes de variante
{/i}5: S/i
{/i}$x: S/i
ancienne écriture {i}5: ERREUR unknown type "i": an annotation on a value received by a constructor must be a known type
{S/s}$n, un type: ana {} S/s
contrat : set v {S/s}abc: S/s
type cast S {/s}abc: S/s
liste {list.S}: S/i S/s
variante inconnue: ERREUR label {/zz} names no variant of S
--- une étiquette ne se range pas
set y {/age}21: ERREUR local annotation {/age} cannot be stored by "set": it only applies between a caller and the command it calls
set y [concat {/age}21]: 21
--- variante dont le nom est aussi un type global
{/elf}5: exe/elf
--- un nom annoté avec une substitution reste un nom
set {rect}Q(A, $k): {1 1} {2 2}