REM is probably for REMOVE (Remove as in remove from code) when compilingHex_Rated wrote:No. GOSUB was used in very old BASIC. It is an unconditional jump as well. JNZ, JNE, JZ, JE, etc are all conditional. Used when you had to define the line number for each line of code.gosub is more equivelant to the JNZ, JNE, JZ, etc. Whilst GOTO is basicly JMP.
eg:
10 GOSUB MYSUB
20 PRINT "Hello 1"
30 SUB MYSUB
40 PRINT "Hello 2"
50 RETURN
55 REM or was it END SUB? Can't remember
60 PRINT "Hello 3"
Would generate
Hello 2
Hello 1
Hello 2
Hello 3
IIRC. This was the state of BASIC programming in Dijkstra's day. Which is probably why he condemned it.
Sub CheckComment
10
if Mid(strLine ,1,3) = "REM" then
comment out
else
end if
Goto 10
End sub
True!!!It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.
I hate C++ i cant grasp it , especially when things dont run in steps