Jump to content

Variable size/Set: Difference between revisions

(Added zkl)
Line 366:
abc=12345678901111111112222222222333333333344444444445555555555.66</lang>
 
=={{header|Scala}}==
.
=={{header|Tcl}}==
In Tcl, most values are (Unicode) strings. Their size is measured in characters, and the minimum size of a string is of course 0.
Line 377 ⟶ 379:
% trace var grill w {format_trace %-10s}
% puts "/[set grill bar]/"
/bar /</lang>..or limit its size to a certain length:
..or limit its size to a certain length:
<lang Tcl>% proc range_trace {n _var el op} {upvar 1 $_var v; set v [string range $v 0 [incr n -1]]}
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.