Posted 28 November 2005 - 04:37 PM
Posted 28 November 2005 - 04:41 PM
Posted 28 November 2005 - 04:42 PM
1->A // Assigns 1 to A
1->A~D // Assigns 1 to A B C & D
Posted 28 November 2005 - 04:43 PM
Posted 28 November 2005 - 04:44 PM
1->A //Assigns 1 to A Lbl 1 A+1->A //Adds 1 to the variable A and stores new value Goto 1 //Returns to Lbl 1
For 1->A to 100 Step 1 //this loop assigns 1 to A then adds 1 to A until it equals 100 Next //Goes back to the start of the loop, adds the step to the variable.
1->A While 1=1 //1 always equals 1 so the expression always evaluates to True A+1->A WhileEnd
1->A Do //Start of the Do/LpWhle loop A+1->A LpWhle A<100 //Loops while A is less than 100
Posted 28 November 2005 - 04:45 PM
1->A If A=1 //expression to be evaluated Then “HI” //result if expression is true “HOW ARE YOU” Else “BYE” //result if expression is false “SEE YOU LATER” If End //end of statement
HI
HOW ARE YOU
BYE
SEE YOU LATER
1->A A=1=>”HI” A=1=>“HOW ARE YOU” A<>1=>”BYE” // <> means not equal to A<>1=>”SEE YOU LATER”
Posted 28 November 2005 - 04:47 PM
0->C For 1->A To 10 //Step can be omitted instead of using Step 1 For 1->B To 10 A+B+C->C Next Next C_ // the _ represents the output sign, it displays whatever is before it and Pauses until [EXE] is pressed.
1100
Disp //caused by _
A<1=>A>0=>”HI” If A<1 Then if A>0 Then “HI” End If End If
Posted 28 November 2005 - 04:51 PM
A<1 and A>0=>”HI”
A<1=>A>0=>”HI”
If A=1 Or B=1 Then “TRUE” End If
If Not (A=1) Then “TRUE” End If
Posted 28 November 2005 - 04:53 PM
Posted 28 November 2005 - 04:54 PM
Posted 28 November 2005 - 04:54 PM
Lbl 1 Locate 1,1,Getkey Goto 1
Posted 28 November 2005 - 04:55 PM
Lbl 0 ClrText Locate 9,4,"CATCH" Locate 1,7,"BY: JAKE FINLEY" Do LpWhile Getkey<>31 ClrText For 1->T To 7 Locate 15,T,"I" Next 7->A -1->S 0->V Locate 16,1,"POINTS" Lbl r Isz S Locate 16,2,S 1->r Int 14Ran#+1->o Lbl 1 Locate o,r,"o" Locate A,7,"> <" Locate o,r," " Locate A,7," " Getkey=27=>A<12=>A+1->A Getkey=38=>A>1=>A-1->A Isz r r=7=>o>=A And o<=A+2=>A+1->o r=8=>o=A+1=>Goto r r=8=>Goto 2 If Getkey=79 Then Locate 16,4,"VORTEX" 1->V IfEnd V=1=>o<A+1=>Isz o V=1=>o>A+1=>Dsz o Goto 1 Lbl 2 ClrText Locate 7,4,"GAME OVER" Locate 1,7,"SCORE:" Locate 8,7,S
Posted 28 November 2005 - 05:01 PM
While A<>B WhileEnd
While A<>B Do LpWhile A=B WhileEnd
Lbl 1 1->A 1->B 1->C //counter var 1->D //counter var Do A+B->A While D<=5 //loops 5 times B+A->B Isz D WhileEnd 1->D Isz C LpWhile C<3 //loops 3 times A+B_
for those of you who are looking at me like I'm stupid: trust me, some people will make this mistake, I have seen highly intelegent people make this mistake so I thought I'd save others the trouble (and frustration).PRIMARY RULE: an inner loop executes fully for each interation (loop) of an outer loop
While A=A //endless loop Isz A Break "THIS ISN'T SHOWN, IT ISN'T EVEN LOOKED AT BY THE PROGRAM" "NEITHER IS THIS" WhileEnd "ESCAPE FROM THE LOOP" //Break goes to here
While A<>B Do Break LpWhile A=A //Break goes to here WhileEnd //loops like normal
Posted 28 November 2005 - 05:03 PM
0 members, 0 guests, 0 anonymous users