Xref: utzoo comp.sys.mac.programmer:11866 comp.sys.mac:47055 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!mcsun!ukc!reading!cf-cm!ralph From: ralph@computing-maths.cardiff.ac.uk (Ralph Martin) Newsgroups: comp.sys.mac.programmer,comp.sys.mac Subject: Re: StringToReal? Message-ID: <1132@cf-cm.UUCP> Date: 18 Jan 90 11:14:13 GMT References: <18429@dartvax.Dartmouth.EDU> <6122@internal.Apple.COM> Organization: University of Wales College of Cardiff, Cardiff, WALES, UK. Lines: 22 In-reply-to: han@apple.COM's message of 11 Jan 90 16:56:45 GMT Byron Han, of Apple, writes: >In article <18429@dartvax.Dartmouth.EDU> boz@eleazar.dartmouth.edu (John >Boswell) writes: >> the dialog box (GetItext, or some >> such thing), puts the data into a STRING variable. I unfortunately need a >> REAL value here! There would be no problem if I needed an integer, since >> StringToNum would do the trick (I guess). Does anyone know if there is >> a similar function to convert to a real-type value? > >In the SANE package, there is a routine, Str2Num which converts a string >to a number. There's a problem with this, surely. Str2Num expects the decimal point to be a point (full stop). In some countries, it may be a comma etc, so Str2Num will not be appropriate, and more fancy things will be needed from the Script Manager package. Comments? Ralph