Next: CONDITIONAL CLAUSES Up: A Short Maple Primer Previous: USER-DEFINED FUNCTIONS

LOOPS

General for-loop: for i from 1 by 1 to 10 do x[i]:=i^2: y[i]:=i^3 od:

Simplified: for i to 10 do x[i]:=i^2: y[i]:=i^3 od:

Writing for t in L do t^2 od; is equivalent to for i to nops(L) do t:=op(i,L); t^2 od;

While-loop: ;tex2htmlhtml_special_mark_gt; while i<3 do i:=i^2+1 od;_


bondaren@thsun1.jinr.ru