Chapter 12

Advanced Programming

Abstract

Looping was the main concept covered in this chapter. This concept, combined with the logical programming discussed in Chapter 9 can make some very powerful programs.

There are two types of loops: for loops and while loops. The for loop loops a specific number of times and is controlled by an iteration variable. The while loop will loop until a specific condition is met. If the condition is never met, the loop will go indefinitely.

The break and continue operators are used to control when and how a program loops. The break operator stops the execution when a specific condition is met. The continue operator allows PTC Mathcad to skip over a portion of a loop and move back to the beginning of the loop.

The ...

Get Essential PTC® Mathcad Prime® 3.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.