while
Execute a command repeatedly while a condition is true.
Syntax
tcl
while test commandParameters
- test: Boolean expression evaluated with
exprbefore each iteration - command: Script to execute while test is true
Examples
Basic countdown
Output
Reading until condition
Output
Using break for complex exit
Output
Fibonacci sequence
Output
