|
Post by George on Jul 25, 2022 13:53:57 GMT -5
Robert: OK, I've altered HALT as you've described.
George
|
|
|
Post by Stefan on Jul 29, 2022 13:52:40 GMT -5
Robert,
I think this is either a thinBasic or an SPFLite 'feature'.
You can use a numeric value directly as a string argument without conversion via TSTR$(...) function.
For example: DIM AS NUMBER lnum = 5
SPF_CMD("LOCATE " & lnum & " TOP")
This will work fine as long as the numeric variable is a plain number.
But, say you wanted to locate the line at lptr - 3, the following numeric expression cannot be used.
SPF_CMD("LOCATE " & lnum-3 & " TOP") To make this work, you either need to invoke conversion, as in
SPF_CMD("LOCATE " & TSTR$(lnum-3) & " TOP")
or use
lnum = lnum - 3 SPF_CMD("LOCATE " & lnum & " TOP")
|
|
|
Post by George on Jul 29, 2022 15:36:04 GMT -5
My thought is to just do the TSTR$ or FORMAT$ conversion and eliminate any possibility of 'what will it do' with the operand. As Robert said, nobody will ever notice any performance impact.
We're all old fogies, systems nowadays are so extremely fast that we have to stop letting our old 'how will this perform' attitudes go, systems now can handle anything we throw at it, and do it blindingly fast.
George
|
|