Also, instead of using GOTO and GOSUB, try using WHILE and DEF WHILE X > 3 X = X - 1 WEND DEF TEST(A) RETURN A+1