Artifact 5bd9e27e4695909e9e50dc82295fbc2b4c0a9742e77e4cb01f0a5fc61da562e8:
- File typeparse/tests_tclsh/t25_champ_optionnel.tcl — part of check-in [17b2667925] at 2026-11-27 11:49:20 on branch tip-764_tcl90 — v18a - label {/name} for fields, variants, named argument and canonic type ({S/s}5, {/s}5) - P/f give the type of the field f of the product P - S/v give the type of the variant v of the sum S - error messages label {celsius:} is now written {/celsius} a variant of a type is now written with /: temp/celsius. - The name of a variant can be a type name. (user: Florentis, size: 323) [annotate] [blame] [check-ins using]
type def p2 {{string}nom ?= "?"; {int}age ?= 3; {string}ville = "Lyon"} set {p2}a {p2/nom}Jean puts $a set {p2}b puts $b type def p3 {{string}nom ?= [string toupper abc]; {int}n ?= $::nn} set nn 7 set {p3}c; puts $c puts [catch {type def p4 {{int}x ?= abc}} m]; puts $m type def d {dict(x, z?=0).int} set {d}e x 1; puts $e