💾 Archived View for zaibatsu.circumlunar.space › ~visiblink › phlog › 20210812 captured on 2023-03-20 at 18:38:08.

View Raw

More Information

⬅️ Previous capture (2021-12-03)

-=-=-=-=-=-=-

edlinfan[1], whose alias alone should 
give you a sense of his history with 
DOS[2], wrote me with an explanation 
of the syntactical differences between 
the GOTO and CALL commands in batch 
files[3].

Apparently, CALL was a late addition 
to DOS commands (at least post-dating 
DOS 3.3).

edlinfan explained that the proper 
syntax for GOTO has never required a 
colon. The weird thing is that with a 
few fantastically aggravating 
exceptions, GOTO was working *with* 
the colons in place, which is why the 
rare errors it produced were so hard 
to figure out.

He also offered an explanation for 
CALL's colon requirement: you can CALL 
a subroutine saved in a separate file. 
If you use the colon, it is clear that 
you are calling a label. If there's no 
colon, it's clear that a file is being 
called. That distinction isn't 
necessary in the case of GOTO, because 
you can't GOTO another file.

So thanks edlinfan! I think the 
mystery of GOTO, CALL, and the colon 
is satisfactorily resolved.
 

[1] gopher://edlinfan.duckdns.org:7000/1

[2] gopher://gopherpedia.com/0/Edlin

[3] gopher://zaibatsu.circumlunar.space/0/~visiblink/phlog/20210811