ML> Can see how setting up a string class with the known EOL
ML> pointer could go a long way toward speeding CPU op times
ML> up in intensive string work, not having to pick through
ML> the array to find CHR$(0). ... Is this the way ...
ML> implement the string functions in M/S Basic ...
As far as I can tell, BASIC uses a string descriptor which
gives both the string length and it's address in the
constantly shifting common memory block used for dynamic
string storage. Whenever a string is deleted, all pointers
to strings above it in string space need to be changed as
the strings above slide down to de-frag the memory and
maintain the largest possible contiguous free space.
In a C++ implementation, it is better to use new and delete
and not worry about it overly much unless your application
becomes noticeably impaired by memory fragmentation.
> ] "Does that motor sound funny to you?" : Buddy Holly.......
---
---------------
* Origin: *YOPS ]I[* 3.1 GIG * RA/FD/FE RADist * Milwaukee, WI (1:154/750)
|