To give you the best experience, this site uses cookies. Continuing to use 9bis.net means you agree to our use of cookies.
 

 

Block structures ( en )

Last modification : 2013/01/26 19:16

Block structures are identified by (...) and {...}.
The difference between the two structures is that commands into a (...) block are executed into a distinct process. In this case it means for example that environment modifications will not be seen into the main process. Look at these scripts:
msh> set A=1
msh> (
 1> (( A = $A + 1 ))
 1> print $A
 1> )
2
msh> print $A
1

msh> set A=1
msh> {
 1> (( A = $A + 1 ))
 1> print $A
 1> }
2
msh> print $A
2