68k Counting

Let's make a program that could define the variable B, as (10^10). Let's start!

Count()
:Prgm
:  Local a,b
:  10^10→b
:  For a,1,b
:    Disp a
:  EndFor
:EndPrgm

Let's break this code down piece by piece starting from the beginning.

counting()
:Prgm

The first code is the title of the project called "Count()" but you could make it whatever you want. While the second code is ": Prgm", which let's the calculator understand that it is a "program".
:  Local a,b
:  10^10→b
:  For a,1,b
:    Disp a

In this code, a "For loop" is established, which will store each successive number from 1 through B (10^10) in variable A.The program then outputs the data currently stored in Variable A, to character space 1,1 in the screen
:  EndFor
:EndPrgm

For this segment, "EndFor" ends the for loop after the code is executed. While "EndPrgm" ends the code.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Noncommercial 2.5 License.