Extract$ Issue if starting position is counted from RIGHT to LEFT
Extract$ does not behave as expected if starting position is counted
from RIGHT to LEFT.
A hint to Eros:
According to a friend (I can't proof it myself) Extract$ and Remain$
fail in PowerBasic if starting position is counted from RIGHT to LEFT.
Afaik thinBasic is implemented in PowerBasic.
By the way, Remain$ works in either direction in thinBasic.
Dim test$ Value "12.34.56"
PrintL "Expect 12 get", Extract$( 1, test$, ".") ' OK
PrintL "Expect 12.34 get", Extract$(-1, test$, ".") ' fails
Yes, thinBasic is based on PowerBasic but due to licence restrictions of PowerBasic in developing compilers or interpreters using PowerBasic, I cannot wrap 1 to 1 PowerBasic functionality.
For this reason most of thinBasic functions are a high level rewrite of the one you can find into PowerBasic.
In this case Extract$ is my own function and not PB wrap.
thinBasic Extract$ does not support negative start position (check in help about that) but I will be happy to try to add it.
I've moved your bug request into feature request area.
Remain$ is another function where I've developed in thinBasic a complete new function instead of wrapping PB one
you are right. I messed it up with the Remain$-Help, sorry for that.
I thought that Extract$ and Remain$ are an exact mirror of each other.
But that would be absolutely true if you may add this behavior in the future.