/
ColdCore-3.0a9.02/
ColdCore-3.0a9.02/src/
new object $help_coldc_forlist: $help_coldc_loop_stmts;

var $has_name name = ['prop, "for-list", "for-list"];
var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "The ", <$format, ["i", [], ["for-list statement"], 'do_i]>, " is used to traverse a list. It has the following syntax:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["tt", [], ["for ", <$format, ["i", [], ["iteration variable"], 'do_i]>, " in (", <$format, ["i", [], ["what expr"], 'do_i]>, ") ", <$format, ["dfn", [["nobound", 1], [" ", 1], ["ind", "4"]], [<$format, ["i", [], ["statement"], 'do_i]>], 'do_dfn]>], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, <$format, ["i", [], ["iteration variable"], 'do_i]>, " must be a local variable (it cannot be an object variable), and ", <$format, ["i", [], ["what expr"], 'do_i]>, " must be an expression resulting in a list or dictionary type. The interpreter executes ", <$format, ["i", [], ["statement"], 'do_i]>, " once for each element in ", <$format, ["i", [], ["what"], 'do_i]>, ", assigning the current element to the ", <$format, ["i", [], ["iteration variable"], 'do_i]>, " for the iteration. Here is an example of using a for-list statement on a list:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["quote", [], ["for s in ([\"foo\", \"bar\", \"baz\"])\n    .tell(s);"], 'do_quote]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "When executed, the method ", <$format, ["i", [], ["tell"], 'do_i]>, " is called three times, the first time with an argument of ", <$format, ["tt", [], ["\"foo\""], 'do_tt]>, " (the first element in the list), the second time with ", <$format, ["tt", [], ["\"bar\""], 'do_tt]>, " (the second element in the list), and the third time with ", <$format, ["tt", [], ["\"baz\""], 'do_tt]>, " (the last element in the list). ", <$format, ["np", [], [], 'do_np]>, "When using a dictionary as ", <$format, ["i", [], ["what expr"], 'do_i]>, ", the interpreter assigns each association in the dictionary to the ", <$format, ["i", [], ["iteration variable"], 'do_i]>, " (see ", <$format, ["link", [["node", "$help_coldc_types"]], ["Dictionaries"], 'do_link]>, "). For example, if the dictionary ", <$format, ["tt", [], ["#[['count, 21], ['name, \"foo\"]]"], 'do_tt]>, " were to be used as the ", <$format, ["i", [], ["what expr"], 'do_i]>, ", the first iteration would set ", <$format, ["i", [], ["iteration variable"], 'do_i]>, " to ", <$format, ["tt", [], ["['count, 21]"], 'do_tt]>, ", and the second iteration would set it to ", <$format, ["tt", [], ["['name, \"foo\"]"], 'do_tt]>, ". ", <$format, ["np", [], [], 'do_np]>, "Assigning to the ", <$format, ["i", [], ["iteration variable"], 'do_i]>, " within a for-list statement will not change the status of the loop; the interpreter remembers where it is at in ", <$format, ["i", [], ["what"], 'do_i]>, " and will continue as normal."], #[['this, $help_coldc_forlist]]]>;
var $help_node index = $help_index_driver;
var $help_node links = #[["Dictionaries", $help_coldc_types]];
var $help_node nolist = 0;
var $root created_on = 854403194;
var $root flags = ['variables, 'methods, 'code, 'core];
var $root inited = 1;
var $root managed = [$help_coldc_forlist];
var $root manager = $help_coldc_forlist;