3 ms·
Do you have any references to the “HP style BASIC”?
by ustad 3y ago
Do you have any references to the “HP style BASIC”?
- whartung 3y agoHere's a quick overview. https://en.wikipedia.org/wiki/HP_Time-Shared_BASIC#String_handling https://en.wikipedia.org/wiki/HP_Time-Shared_BASIC#String_ha... The key detail is that HP BASIC dimensions the individual strings, where MS does not. Since the HP strings have dimensions, they're constrained. Given a typical max length of 255, you can see a string expression being done with a 255 byte work buffer and, when complete, moved into the dimensioned space. So, in the end, there's just a work buffer and the string. With MS, strings are just pointers to places in memory (for examples the static strings in the code). So it's a whole "malloc/free" thing with the strings, but if the work space fills up, you can compact the heap and move the variable string pointers. Different mechanic. Simple garbage collection, but it is garbage collection.