Post by hal9k on Jun 15, 2023 13:58:56 GMT -5
I'm new and not a great programmer. I've now written a few LB programs and thouht I would share a few wishes and observations.
For many years I worked for a large computer company that had a very good BASIC that I used frequently. It had a few features that I find myself missing when I use LB. Here are the ones I miss the most:
1. Virtual Arrays. This great feature allowed you to associate an array with a data file. When your code opened the file, it populated the array. When you closed the file, the current array contents were written to the file. I realize that I can write my own code to do this (and I did), but it was very handy to have it done automagically.
2. Change. The syntax was CHANGE (string variable) TO (numeric array name). For example, "CHANGE A$ to A". This would store the ASCII value of each charater in the sting into the corresponding slot in the array. This came in very handy for parsing and encoding. I think it also stored the length of the string into the 0 array element. The memories are foggy, but I think you could also reverse it to rebuild the string from the array contents.
3. Fields could be array elements. If this were implemented and also expanded to include gui controls, then you could populate or store fielded values and controls in a very simple loop. EG. for i = 1 to 20 : PRINT #Win.Ctl(i), Fld$(i) : next i
4. NOT as part of the syntax or a function.
My last one is not from any BASIC I've ever seen, but it's kinda fun. Imagine if EVAL did more than evaluating an expression. What if the expression could be any LB command that could you build on the fly. The possibilities are limitless...
Nothing critical, just my $0.02 worth.