joe rocci - 2017-10-14

Seems very hard to follow and very inefficient use of code space/processor time. I assume the "goto sub.." notation isn't the way it really is, or is it really "gosub" or just "subroutine name". I'm having trouble understanding the advantages. 
Seems like a state machine using a  Case structure as a dispatcher to subroutine calls would read easier and be less prone to unanticipated results. Rebuilding the program flow then only requires modification to the stste machine. I think (but I might be wrong) this is an example of why purists don't like the  goto statement. 

-------- Original message --------
From: stan cartwright stanleyella@users.sf.net
Date: 10/14/2017 9:46 AM (GMT-05:00)
To: "[gcbasic:discussion]" 579125@discussion.gcbasic.p.re.sf.net
Subject: [gcbasic:discussion] RE: [gcbasic:discussion] Stack Depth?

A gosub returns to the next basic line. Goto could do the same but it looks messy code but no stack use.

I was joking about goto but not about putting subs in line.

Take the glcd line code for ssd1306. Every pixel in the line is plotted from pset sub. The pset sub could be in line instead of repeatedly being called and would draw lines faster.

RE: [gcbasic:discussion] Stack Depth?

Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/gcbasic/discussion/579125/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/