APL Wiki logo: Difference between revisions
Jump to navigation
Jump to search
→Generating indices
Miraheze>Adám Brudzewsky |
Miraheze>Adám Brudzewsky |
||
Line 30: | Line 30: | ||
* [[Assignment]] is not done with <source lang=apl inline>=</source> like in many other programming languages, but rather with <source lang=apl inline>←</source> which also indicates the direction of the assignment: Whatever is on the right gets put into the name on the left. | * [[Assignment]] is not done with <source lang=apl inline>=</source> like in many other programming languages, but rather with <source lang=apl inline>←</source> which also indicates the direction of the assignment: Whatever is on the right gets put into the name on the left. | ||
== Generating indices == | === Generating indices === | ||
The <source lang=apl inline>⍳</source> function takes a number ''N'' and [[index generator|generates indices]] until is has made ''N'' indices. Since we set <source lang=apl inline>⎕IO</source> to 0, we count from 0 until right before ''N'': | The <source lang=apl inline>⍳</source> function takes a number ''N'' and [[index generator|generates indices]] until is has made ''N'' indices. Since we set <source lang=apl inline>⎕IO</source> to 0, we count from 0 until right before ''N'': | ||