From: | Rob Hutchinson |
Date: | 31 Aug 99 at 05:36:49 |
Subject: | Re: string -> float,... HUH? |
Hello David
Hiya, David... ,on 30-Aug-99 you mailed me about: Re: string -> float! So I`ma reply`in...
>> I'm trying to convert a string of the form 1e23 into a float so that I
>> can perform maths on it. Only problem is - Val() doesn't support the "e".
>> Anybody know of a way in which I can do this?
[ Cut hard way! ]
> I'm not sure if the code for finding the location of the start of the
> exponent is correct, but its something like that
Seen as both James and Daves routines gave different answers,
I asume they were both wrong???? ;)
Well, either way, if your after what I think your after?
I think you could just do:
a$="1e23"
floataloaf.f=Val("$"+a$)
NPrint floataloaf
ClickMouse
Provided that of course 1e23 is a hex number ;)
But that seems so simple, so I`m probably pissing up the wrong tree ;)
BTW - you can also use the commands: Hex#, and Bin# to
do similar stuff.
>
Rob,
---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie