Re: A newbie question

new topic     » goto parent     » topic index » view thread      » older message » newer message

> If I read a record from a file with gets it is stored in a sequence, one
> character per element.  If part of the record represents numeric data,
> e.g. a dollar amount, how can I convert the slice of the sequence
> containing "12.34" into the number 12.34 so that I can do arithmetic
> with it?

> Thanks,
> Philip.

Hi,

include get.e
constant string="12.34"
atom number
number = value(string)

Thomas Parslow (PatRat) ICQ #:26359483
Rat Software
http://www.ratsoft.freeserve.co.uk/
Please leave quoted text in place when replying

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu