[futurebasic] Re: [FB] Significant digits question.

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 2004 : Group Archive : Group : All Groups

From: Darron Forehand <glo@...>
Date: Sat, 27 Nov 2004 19:08:19 -0600
Ha!  Finally answered one. ;)

Try this:

'--- main ---

window 1,"Test",(0,0)-(300,300)
dim value#
dim a$


a$ = "123.2222"
print "In = ";a$
value# = val(a$)
print
print "Out = ";value#
print
print "But, what I want is 123.2222"

do
HandleEvents
until gFBQuit


Darron


tedd wrote:

> Hi gang:
>
> This is a simple problem, but the solution escapes me. Please review 
> the following code.
>
> I don't want to use "using" -- what I want is a variable that has the 
> value of 123.2222 derived from a string.
>
> I've tried using "dim value as fixed", but I can't get that to work -- 
> it acts like an integer.
>
> Thanks to all those who consider.
>
> tedd
>
> '--- main ---
>
> window 1,"Test",(0,0)-(300,300)
> dim value as single
> dim a$
>
> a$ = "123.2222"
> print "In = ";a$
> value = val(a$)
> print
> print "Out = ";value
> print
> print "But, what I want is 123.2222"
>
> do
> HandleEvents
> until gFBQuit
>
>
>