[Info-vax] Coding with/without RDBMS
Dave Froble
davef at tsoft-inc.com
Thu Oct 14 15:36:41 EDT 2021
On 10/14/2021 2:06 PM, Simon Clubley wrote:
> On 2021-10-14, Dave Froble <davef at tsoft-inc.com> wrote:
>> Was getting way off topic, so new topic
>>
>> Time to spam c.o.v
>>
>> :-)
>>
>
> Having compared the two programs, I find the Pascal version to be
> a lot more readable and easier to follow than the Basic version,
> although Arne does put his begin statements in a strange place... :-)
Yeah, Arne's code had lots of comments to explain things. Not!
I'd really be interested in what parts of the Basic code was so bad?
I do realize that since you are not familiar with DAS and it's implementation,
and my library routines, which would not be understood. That's normal.
> The Basic version has much more jumping around and just doesn't read
> as well as the Pascal version does.
I really resent that claim. With a few exceptions, mainline code is pretty
much straight through, and for someone who seems to like scripting languages
with all their library routines, placing specific in subroutines should
seem rather natural.
I'm a really big fan of modular code.
My IDE is a big fan of things having a place, and things being in their place.
Much of what you call jumping around is actually the IDE pulling in pieces of
code to perform specific functions. I'm guessing if I had pulled in the forms
control stuff, which is used for paging in reports, you'd be even more confused.
But it works great, and doesn't have to be re-written for every program. Such
also avoids coding errors.
> BTW, Basic really does like spewing its special characters onto the
> end of variable references. :-)
And other languages don't have such quirks?
> One thing I was surprised by was the goto and gosub to integer line
> numbers instead of looping constructs and named function calls with
> parameters as you see in the Pascal example and in other languages
> such as C and Ada.
I've seen people attempt to jump through many difficult hoops to attempt to follow
some coding standard. Doesn't make any sense to me. There are perfectly logical
uses for both GoSub and GoTo. Such as just throwing out the anchor if fatal errors
occur. Moving special functionality out of the mainline code makes it more readable,
for me.
Did I mention I don't like C, and most likely would not like Ada?
Got to ask, just what do you think a NEXT, WHILE_END, and such statements do?
Sure looks like another form of GoTo to me.
> Is that style normal in DEC Basic code ?
No, it is not. I've seen people attempt to force their coding standards
in many languages, including Basic. It is a people thing.
Personally, I think my example was rather easy to read, and straight forward. Any
issue with subroutines is most likely due to having to read them elsewhere,
something that was much easier with paper listings. But, much of that was again,
because of the IDE pulling in pre-written code. I know what they do, you don't,
so our perceptions will obviously be different.
--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef at tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486
More information about the Info-vax
mailing list