Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.apple2.programmer > #5988
| Newsgroups | comp.sys.apple2.programmer |
|---|---|
| Date | 2022-09-28 12:45 -0700 |
| References | <72291a9a-aeb8-430e-b8e3-abd3f865c750n@googlegroups.com> <tccabf$1pg12$1@dont-email.me> <dog_cow-1659558921@macgui.com> |
| Message-ID | <3ee69bf1-8a92-4ff6-8c04-ac41b18d4733n@googlegroups.com> (permalink) |
| Subject | Re: Colons in AppleSoft |
| From | Martin Doherty <martindoherty377@gmail.com> |
On Wednesday, August 3, 2022 at 4:35:24 PM UTC-4, D Finnigan wrote:
> Jeff Blakeney wrote:
> > On 2022-08-02 5:15 p.m., Tom Thumb wrote:
> >> 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?
> >
> > 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.
> >
> I agree. This is a technique that I've seen before in Applesoft listings.
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
Back to comp.sys.apple2.programmer | Previous | Next — Previous in thread | Find similar
Colons in AppleSoft Tom Thumb <justliketomsthumbsblues@gmail.com> - 2022-08-02 14:15 -0700
Re: Colons in AppleSoft Jeff Blakeney <CUTjeffrey_blakeney@yahoo.ca> - 2022-08-02 19:01 -0400
Re: Colons in AppleSoft Tom Thumb <justliketomsthumbsblues@gmail.com> - 2022-08-02 16:13 -0700
Re: Colons in AppleSoft qkumba <peter.ferrie@gmail.com> - 2022-08-03 08:48 -0700
Re: Colons in AppleSoft D Finnigan <dog_cow@macgui.com> - 2022-08-03 20:35 +0000
Re: Colons in AppleSoft Martin Doherty <martindoherty377@gmail.com> - 2022-09-28 12:45 -0700
csiph-web