[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Introducing: Magic Gosub
On Aug 13, 12:19 am, ke...@hackaday.com wrote:
> I find this interesting but what impact does it have on performance
It has a small impact on performance, particuarly the further down the
program the REM statement is, since it is searched for from line 1. In
a future version, I may have it create an index on first run, which
would eliminate this (and in fact make it faster than a regular
numbered GOSUB). As it is, I hardly notice it on a 1 MHz machine, even
for a very long program; it's not as though Applesoft is a speed demon
in the first place.
> its not much to provide a list of sub's for reference (though in fairness I always have and will HATE
> writing applesoft on the II so its not that big of a deal to scroll around gedit, or have a reference list
> window open for me)
I feel the same way, and write my all my Applesoft code in BBEdit/
TextWrangler, and wrote a language module for it to provide the syntax
coloring and populate the function menu (when you use the REM
SUB^MyRoutine syntax supported by Magic Gosub). With that said, I
still find line numbers to be a huge nuisance, even with a reference
list, and Magic Gosub is a step towards making them less important --
I can just put all my subroutines, even self-standing libraries, at
any old line number and then focus on the rest of my program.
On Aug 13, 12:58 am, Moose <mo...@move.to> wrote:
> Now, if only we could pass parameters and get return values back .... ;)
Not a bad idea, and it should be doable, though of course not with the
notion of local variable scope. I'll give that some thought for a
future version as well...