On Feb 14, 2017, at 1:45 PM, Brian S <fblistserve@...> wrote:


On Feb 14, 2017, at 1:13 PM, Brian S <fblistserve@...> wrote:


On Feb 14, 2017, at 1:10 PM, Brian S <fblistserve@...> wrote:


On Feb 14, 2017, at 11:54 AM, Brian S <fblistserve@...> wrote:


Mark wrote: I’ll shortly send you an ftp address for the sample file, off-channel.
Brian wrote:  Got the source and can reproduce the issue by running LabAnalyst. Thank you for sending.

FWIW: the bug may be reproduced with the following FB code:

//-----------------------
dim as container c1
dim as short tot : tot = 0
c1= " "

if right$$(c1,1) <> "," AND right$$(c1,1) <> chr$(9) then inc( tot )    //<<<<<< errors here
//-----------------------

Above code allows anyone to create the C code and debug runtime code should they want to leave their comfort zone and take a look?
I haven't investigated yet and we need more bug fixers than me.

Mark, if you want to try a workaround, load a temporary container with the value to compare ( such as chr$(9)  or "," ) . This avoids the bug and should get you going. Please let me know.


//-----------------------
dim as container c1, t1, t2
dim as short tot : tot = 0
c1= " "
t1 = ","
t2 = chr$(9)
if ( right$$(c1,1) <> t1 ) 
if ( right$$(c1,1) <> t2 )
inc( tot )
end if
end if
//-----------------------

A tad more efficient to do the right$$ only once. e.g.

//-----------------------
dim as container c1, t1, t2, t3
dim as short tot : tot = 0
c1= " "
t1 = ","
t2 = chr$(9)
t3 = right$$(c1,1)
if ( t3 <> t1 ) 
if  ( t3 <> t2 )
inc( tot )
end if
end if
//-----------------------


I"ll keep you posted of any ideas that don't involve having to use the above workaround. 

If you download another copy of FB 5.7.97 from the FBtoC site, it should solve this problem and handle the string literals in one compound if without having to fiddle with it.

Just noticed your workarounds worked. Good!

Brian





--
To unsubscribe, send ANY message to: futurebasic-unsubscribe@... To access the list archives, go to: http://freegroups.net/groups/futurebasic/