Example: A Double Loop with Exit Condition

The conditional statement forces a user to exit both loops if the condition is satisfied.
for $1 in ( a b c d e ) loop m1
  while ($2 > 10.0 ) loop m2
     if ($3>1000.0) then  exit  m1  end if 
     evaluate ($2=$2-1.0)
  end loop m2
end loop m1


Xplor-NIH 2023-11-10