For loop: Difference between revisions

From SMath Wiki
Jump to navigation Jump to search
(Created page with "'''for''' loops are accessed via the function menu, or the programming functions panel. If you type '''for''' into your worksheet it won't do what you expect. '''Advice: Choose it from the Programming palette''' There are two forms of '''for'''. The first is the one that appears when you first press the '''for''' button. It steps the variable through each element of the matrix in the second argument. The ε sign means 'is an element of' File:Programming_forlo...")
 
No edit summary
 
Line 5: Line 5:
There are two forms of '''for'''. The first is the one that appears when you first press the '''for''' button. It steps the variable through each element of the matrix in the second argument. The ε sign means 'is an element of'
There are two forms of '''for'''. The first is the one that appears when you first press the '''for''' button. It steps the variable through each element of the matrix in the second argument. The ε sign means 'is an element of'


[[File:Programming_forloop1.jpg]]
[[File:En_programming_forloop1.jpg]]


The second method is started the same way, but when you enter a comma the  '''for''' line changes to the other mode.
The second method is started the same way, but when you enter a comma the  '''for''' line changes to the other mode.


[[File:Programming_forloop2.jpg]]
[[File:En_programming_forloop2.jpg]]


In order to write longer programs you need to add [[line block]]s.
In order to write longer programs you need to add [[line block]]s.

Latest revision as of 12:14, 12 September 2024

for loops are accessed via the function menu, or the programming functions panel. If you type for into your worksheet it won't do what you expect.

Advice: Choose it from the Programming palette

There are two forms of for. The first is the one that appears when you first press the for button. It steps the variable through each element of the matrix in the second argument. The ε sign means 'is an element of'

The second method is started the same way, but when you enter a comma the for line changes to the other mode.

In order to write longer programs you need to add line blocks.


This page is inspired by legacy wiki article https://smath.info/wiki/for.ashx.