[Info-vax] DEC Basic and dynamic memory ?

Dave Froble davef at tsoft-inc.com
Sun Jan 30 19:58:58 EST 2022


On 1/30/2022 6:45 PM, Simon Clubley wrote:
> On 2022-01-28, seasoned_geek <roland at logikalsolutions.com> wrote:
>>
>> Oh, you don't like it as a doubly linked list?
>>
>> RECORD SOME_RECORD
>> STRING IN_USE=1%
>> STRING SOME_KEY_VALUE=15%
>> INTEGER  LEFT_NODE
>> INTEGER  RIGHT_NODE
>> INTEGER  PARENT_NODE
>> STRING    WHOLE_LOT_OF_STUFF=255%
>> ! other fields
>> END RECORD
>>
>> You can even redimension if need be.
>
> If _that's_ how you do a tree in DEC Basic, then yuck, yuck, yuck!!!

Are you trying to show some bias?

Some people show you some very simple uses of the RECORD statement, and because 
they are not fleshed out, you don't see the use.  Hey, i do this for 
compensation, cough up some money and I'll write any application you want in Basic.

Basically (sic) the RECORD statement is a method of defining structures, and it 
can be very flexible.  Also understandable.  Can you say that about C?

> For starters, what about when you want to prune the tree and insert
> new branches and leaf nodes while you are processing it ?

Can be done.  I haven't yet seen any applications where such is needed. 
Usually, an application is designed for a specific need, and then Basic can be 
used to implement the application.

> My question was driven by Arne's comment that he would prefer DEC Basic
> over C for userland applications. If you are going to replace C, then
> you need a language that can do everything C can, and do it better.

Anything application wise you can do in C, I can duplicate in Basic, and many 
times much easier.

Do programmers do their own memory management in Basic?  Not if they don't have 
to.  But it can be done.  Why?  Because on VMS, playing around with memory is an 
OS thing, not a language thing.

> That's certainly true for Pascal, but not true for DEC Basic based
> on what I see above. DEC Basic might be suitable for some less complex
> programs, but certainly not all of the userland programs.

Suitable is a nebulous term.  Suitable for whom?

> For example, could you cleanly write a CDU replacement or a TPU
> replacement in DEC Basic ? I've never seen the source code for either
> of them, but I would expect both of those to use variable sized
> tree building and processing because of the parsing they do.

Just why do you think Basic cannot do this?

I will admit that VSI Basic has some issues.  All of them are implementation 
specific, not language specific.  That is a rather important distinction.

-- 
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