(I forgot to add delimiters to the X array being built)
My original question about memory allocation and overhead while
incrementally appending, & increasing string length still stands.
note 2 changed lines below:
> From: Stevenson, Charles
> X = SPACE( 1000000 ) ;* reserve a million bytes of memory
> PTR = 1
> FOR I = 1 TO 50000
> GOSUB get.string.to.append
> X[ PTR, LEN( STRING.TO.APPEND ) ] = STRING.TO.APPEND
fix: X[ PTR, LEN( STRING.TO.APPEND ) ] = STRING.TO.APPEND: @AM
======
> PTR+= LEN( STRING.TO.APPEND )
fix: PTR+= LEN( STRING.TO.APPEND ) + 1
=====
> NEXT I
> X = TRIMB( X )
but now you have trailing attribute mark to deal with...
Close enough for an example. You get the idea.
cds
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/