[futurebasic] Re: [FB] Detecting a decimal point in an edit field.

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : April 2005 : Group Archive : Group : All Groups

From: Alain Pastor <apastor@...>
Date: Sat, 09 Apr 2005 17:52:22 +0200
Jay Reeve a écrit :
> On Saturday, April 9, 2005, at 02:11  AM, Alain Pastor wrote:
> 
>> Jay Reeve a écrit :
>>
>>> Alain,
>>> Okay, show-off. That's clearly the way to do it. I couldn't find 
>>> that, so I was going to propose this:-)
>>> def fn numString$= left$(str$(-pi), 10)+"078"
>>> '
>>> LONG IF INSTR(1,fn numstring$,gKey$) = 0
>>> gKey$ = ""
>>> End if
>>
>>
>> Unfortunately, that would not address the decimal point issue because 
>> PI returns a floating point number suited for the environment whose 
>> decimal point is always a period. Anyway, I was surprised not to find 
>> the Intl0 and Intl1 structures defined in the FB headers.
> 
> 
> Seems to me the issue is not the format of PI, but the implementation of 
> STR$(). Looking at the runtime, I thought it dealt with the decimal 
> issue, but I may have been mistaken. I'll bet it could be changed to do 
> so without too much difficulty.
> 

Are you saying that the STR$ function should handle the conversion?
I'm not sure the cure would come free of some hidden diseases, but to be 
consistent the VAL function would have to be changed too, I guess.

Alain