Extract$ Issue if starting position is counted from RIGHT to LEFT
issueid=351 18-03-2012 14:10
Junior Member
Number of reported issues by Klaus Heinz: 2
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.

Klaus

Uses "console"

Dim test$ Value "12.34.56"

PrintL "Expect 12    get", Extract$( 1, test$, ".") ' OK
PrintL "Expect 12.34 get", Extract$(-1, test$, ".") ' fails 


WaitKey
'
Issue Details
Issue Number 351
Issue Type Feature
Project thinBasic
Category Core engine (thinCore.dll)
Status Suggested
Priority Unknown
Suggested Version 1.8.9
Implemented Version (none)
Milestone (none)
Votes for this feature 0
Votes against this feature 0
Assigned Users (none)
Tags (none)




18-03-2012 14:38
thinBasic author
Hi Klaus,

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

Ciao
Eros

18-03-2012 15:05
Junior Member
Hi Eros,

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.

Regards,
Klaus

+ Reply