[Info-vax] DEC Basic and dynamic memory ?

Arne Vajhøj arne at vajhoej.dk
Sun Jan 30 18:54:39 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!!!
> 
> For starters, what about when you want to prune the tree and insert
> new branches and leaf nodes while you are processing it ?
> 
> 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.
> 
> 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.
> 
> 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.

It is actually not that different from the C/Pascal way.

It just use array indexes instead of pointers/addresses.

So 3 integers instead of 3 pointers.

You can do tree's, hash tables's etc. that way.

Just a different way of thinking.

Arne




More information about the Info-vax mailing list