Path: utzoo!utgpu!watmath!att!dptg!rutgers!mailrus!wasatch!cs.utexas.edu!uunet!microsoft!ericsc
From: ericsc@microsoft.UUCP (Eric Schlegel)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Script Manager compatible atof()?
Message-ID: <7304@microsoft.UUCP>
Date: 9 Aug 89 16:01:13 GMT
References: <14919@dartvax.Dartmouth.EDU>
Reply-To: ericsc@microsoft.UUCP (Eric Schlegel)
Organization: Microsoft Corp., Redmond WA
Lines: 17

In article <14919@dartvax.Dartmouth.EDU> earleh@eleazar.dartmouth.edu (Earle R. Horton) writes:
>     My requirements are simple: convert an editText item, input in
>any font or script, to floating point extended or double using the new
>Script Manager for full generality.

Use the SANE routine Str2Num, which takes a string and returns an
extended. According to IM V-302 (the docs for version 1 Script Man):
    
    Applications that want to check ASCII strings to see if they
    are valid numeric fields, or convert ASCII strings to their
    equivalent numeric values, should use the SANE routines to
    do so. These routines will always return the correct result,
    regardless of the script in which the number is written.

eric
----
These opinions are MINE, ALL MINE!!!