print("Yay, berri.\n");
while (mike.lookingFor() != jesus)
{
print("oh, good.\n");
mike.nextLooking();
}
print("Ohnoes, he's christian!\n");
method 1 (IFST)
//prints "Yay, berri\n" to output stream.
01 PRNT "Yay, berri\n"
//starts an equation
02 SEQT
//pushes object 'mike' to stack
03 SOBJ mike
//executes function 'lookingFor' onto end of stack ('mike'), and pushes return to stack
04 SFUN lookingFor
//pushes object 'jesus' to stack
05 SOBJ jesus
//pushes 'operation not equal' ('!=') to stack and executes operation on top two of stack
06 ONQL
//ends equation and pushes remainder of stack (one variable) to 'return' stack.
07 EEQT
//IFIF pops last variable off of return stack
//if variable is not 0, then it executes until IFST
//else, interpreter continues until IFST and then begins parsing again.
08 IFIF
//prints "oh, good.\n" to output stream.
09 PRNT "oh, good.\n"
//pushes object 'mike' to temporary arguments
10 PARG mike
//pushes stack frame to function 'nextLooking', with temporary arguments
11 PSTK nextLooking
//goes to line 02 (02 would be replaced with address)
12 GOTO 02
//stop command for if statement. Used as locator.
13 IFST
//prints "Ohnoes, he's christian!\n"
14 print "Ohnoes, he's christian!\n"
method 2 (ARG)
//prints "Yay, berri\n" to output stream.
01 PRNT "Yay, berri\n"
//starts an equation
02 SEQT
//pushes object 'mike' to stack
03 SOBJ mike
//executes function 'lookingFor' onto end of stack ('mike'), and pushes return to stack
04 SFUN lookingFor
//pushes object 'jesus' to stack
05 SOBJ jesus
//pushes 'operation not equal' ('!=') to stack and executes operation on top two of stack
06 ONQL
//ends equation and pushes remainder of stack (one variable) to 'return' stack.
07 EEQT
//IFIF pops last variable off of return stack
//if variable is not 0, then it executes until IFST
//else, interpreter continues until line 13 and then begins parsing again.
08 IFIF 13
//prints "oh, good.\n" to output stream.
09 PRNT "oh, good.\n"
//pushes object 'mike' to temporary arguments
10 PARG mike
//pushes stack frame to function 'nextLooking', with temporary arguments
11 PSTK nextLooking
//goes to line 02 (02 would be replaced with address)
12 GOTO 02
//prints "Ohnoes, he's christian!\n"
13 print "Ohnoes, he's christian!\n"