| 1 |
#%Module1.0 |
| 2 |
|
| 3 |
############################################################################## |
| 4 |
# Modules Revision 3.0 |
| 5 |
# Providing a flexible user environment |
| 6 |
# |
| 7 |
# File: break/%M% |
| 8 |
# Revision: %I% |
| 9 |
# First Edition: 2017/06/07 |
| 10 |
# Last Mod.: %U%, %G% |
| 11 |
# |
| 12 |
# Authors: Xavier Delaruelle, [email protected] |
| 13 |
# |
| 14 |
# Description: Testuite modulefile |
| 15 |
# Command: |
| 16 |
# Sub-Command: break |
| 17 |
# |
| 18 |
# Invocation: load @M@/foo |
| 19 |
# Result: %R{ |
| 20 |
# }R% |
| 21 |
# Comment: %C{ |
| 22 |
# This modulefile is used for checking whether the |
| 23 |
# TCL "break" mechanism is working, |
| 24 |
# where this is a valid loop "break" within a proc |
| 25 |
# }C% |
| 26 |
# |
| 27 |
############################################################################## |
| 28 |
|
| 29 |
proc loop_from_proc {} { |
| 30 |
global i |
| 31 |
set i 0 |
| 32 |
while {$i < 99} { |
| 33 |
incr i |
| 34 |
if {$i == 9} break |
| 35 |
} |
| 36 |
} |
| 37 |
|
| 38 |
loop_from_proc |
| 39 |
setenv testsuite6 $i |