Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.apple2.programmer > #5979 > unrolled thread
| Started by | Tom Thumb <justliketomsthumbsblues@gmail.com> |
|---|---|
| First post | 2022-08-02 14:15 -0700 |
| Last post | 2022-09-28 12:45 -0700 |
| Articles | 6 — 5 participants |
Back to article view | Back to comp.sys.apple2.programmer
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
| From | Tom Thumb <justliketomsthumbsblues@gmail.com> |
|---|---|
| Date | 2022-08-02 14:15 -0700 |
| Subject | Colons in AppleSoft |
| Message-ID | <72291a9a-aeb8-430e-b8e3-abd3f865c750n@googlegroups.com> |
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?
[toc] | [next] | [standalone]
| From | Jeff Blakeney <CUTjeffrey_blakeney@yahoo.ca> |
|---|---|
| Date | 2022-08-02 19:01 -0400 |
| Message-ID | <tccabf$1pg12$1@dont-email.me> |
| In reply to | #5979 |
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.
[toc] | [prev] | [next] | [standalone]
| From | Tom Thumb <justliketomsthumbsblues@gmail.com> |
|---|---|
| Date | 2022-08-02 16:13 -0700 |
| Message-ID | <495587c0-4fda-46b5-ab49-3866af5868c8n@googlegroups.com> |
| In reply to | #5980 |
> 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.
[toc] | [prev] | [next] | [standalone]
| From | qkumba <peter.ferrie@gmail.com> |
|---|---|
| Date | 2022-08-03 08:48 -0700 |
| Message-ID | <1d19482f-99c9-47d4-a0b9-4e5359dff00en@googlegroups.com> |
| In reply to | #5981 |
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.
[toc] | [prev] | [next] | [standalone]
| From | D Finnigan <dog_cow@macgui.com> |
|---|---|
| Date | 2022-08-03 20:35 +0000 |
| Message-ID | <dog_cow-1659558921@macgui.com> |
| In reply to | #5980 |
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.
[toc] | [prev] | [next] | [standalone]
| From | Martin Doherty <martindoherty377@gmail.com> |
|---|---|
| Date | 2022-09-28 12:45 -0700 |
| Message-ID | <3ee69bf1-8a92-4ff6-8c04-ac41b18d4733n@googlegroups.com> |
| In reply to | #5983 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | comp.sys.apple2.programmer
csiph-web