Download Maple Introductory Programming Guide
Transcript
5.2 Repetition • 177 > L := [7,2,5,8,7,9]; L := [7, 2, 5, 8, 7, 9] > for i in L do > if i <= 7 then > print(i) > end if; > end do; 7 2 5 7 This code cycles through the operands of object L, in this case, a list. The object can be, for example, a set, sum of terms, product of factors, or string of characters. The while Loop The for loop is used to repeatedly execute a sequence of statements until a condition is satisfied. The while loop is a for loop with all of its clauses omitted except the while clause. while expr do statseq end do The expression expr is called the while condition. It must be a Boolean-valued expression. That is, it must evaluate to true, false, or FAIL. > x := 256; x := 256 > while x>1 do > x := x/4 > end do;
Related documents
WebSphere Studio Application Developer
TEXsis
Maple Programming Guide
Maple Advanced Programming Guide
Apache Struts 2 Web Application Development:
eTPU Simulator Reference Manual
User`s Manual - File Management
Duolabs proudly presents:
Full eXpert-BSM v.1.5 User Manual
Maple Getting Started Guide
downloadable file, 412KB, - Tennessee Technological University
AN-878 High Speed ADC SPI Control Software