Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Colons in AppleSoft

80 views
Skip to first unread message

Tom Thumb

unread,
Aug 2, 2022, 5:15:41 PM8/2/22
to
I was entering lines in AppleSoft from an Open Apple issue. Some lines begin with colons such as:

350 : GOSUB 1000
440 :: GOSUB 1000

I know a colon separates statements on the same line but what are they doing it the above statements? Adding empty statements? For what purpose?

Jeff Blakeney

unread,
Aug 2, 2022, 7:01:05 PM8/2/22
to
It is possible they were just trying to indent the code to make it look
more like a structured listing to make it easier to find sections.

Tom Thumb

unread,
Aug 2, 2022, 7:13:18 PM8/2/22
to

> It is possible they were just trying to indent the code to make it look
> more like a structured listing to make it easier to find sections.

Hmm, I guess, thank you. I removed them all and the code runs the same, so, no functional purpose other than what you suggest. Again, hmm.
I felt a little silly for asking, but, I'm impulsive.

qkumba

unread,
Aug 3, 2022, 11:48:05 AM8/3/22
to
Depending on the source, it might be bad OCR, or there might have been code in the original that was erased with a hex-editor, but leaving the colons in place to prevent syntax errors.

D Finnigan

unread,
Aug 3, 2022, 4:35:24 PM8/3/22
to
I agree. This is a technique that I've seen before in Applesoft listings.

Martin Doherty

unread,
Sep 28, 2022, 3:45:12 PM9/28/22
to
I also agree with Jeff and Dave, it's just a programming workaround to provide a little bit of code indenting in a language that doesn't natively support doing that. There would be a slight performance penalty, but probably very little

A guy named Andres Lozano built a nice pre-processor for Applesoft that lets you code in a virtualized, improved language he calls Virtual Basic which it translates into standard Applesoft for execution. Just thought I'd mention it for those of us who wish we could indent our Applesoft code :)
https://virtualbasic.org/

rem my main program
print "this is my first test"
gosub @printhello
end

rem my subroutine
#printhello
s$ = "hello world"
print s$
a= 10:b= 5
print a + b
return

--Martin
0 new messages