Changeset 10846 for trunk/Ohana/src/opihi/cmd.basic/run_for.c
- Timestamp:
- Dec 27, 2006, 10:43:47 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/cmd.basic/run_for.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.basic/run_for.c
r10647 r10846 79 79 80 80 status = TRUE; 81 interrupt = loop_break =FALSE;81 interrupt = FALSE; 82 82 for (value = start; (sign*value < sign*end) && !interrupt; value += delta) { 83 loop_continue = loop_break = FALSE;84 83 if ((int)value == value) 85 84 set_int_variable (argv[1], (int) value); … … 88 87 status = exec_loop (&loop); 89 88 value = get_double_variable (argv[1]); 89 if (loop_next) continue; 90 if (loop_last) break; 90 91 if (loop_break) break; 91 if (loop_continue) continue;92 92 } 93 loop_continue = loop_break = FALSE; 93 loop_last = loop_next = FALSE; 94 /* 'last' and 'next' should only affect one loop */ 94 95 if (auto_break && !status) loop_break = TRUE; 95 96 … … 99 100 } 100 101 free (loop.line); 102 101 103 if (loop_break) return (FALSE); 102 104 return (TRUE); … … 109 111 */ 110 112 113 /* while processing the loop, the loop status variables may be set 114 by the loop commands, or the loop may quite on a failed command, 115 setting the exec_loop return status to false. the loop status variables 116 are: 117 loop_next : stop this loop, but try another loop 118 loop_last : stop loop processing, but return true so external loop may continue 119 loop_break : stop loop processing, and return false so external loop will break 120 interrupt : external interrupt signal 121 */ 122
Note:
See TracChangeset
for help on using the changeset viewer.
