Path: utzoo!attcan!uunet!snorkelwacker!apple!well!smoke From: smoke@well.sf.ca.us (Nicholas Jackiw) Newsgroups: comp.sys.mac.programmer Subject: Re: Reading Numbers from Modal Dialog Items...PLEASE HELP Summary: use SANE Message-ID: <20760@well.sf.ca.us> Date: 25 Sep 90 17:29:20 GMT References: <29331@netnews.upenn.edu> Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 25 In article <29331@netnews.upenn.edu> isler@grad1.cis.upenn.edu (Sylvia-Kay ISLER) writes: >I am writing a program in Think C 3.0 that has to obtain floating point values >from modal dialog items. I am running into serious problems. > >Sylvia Isler >isler@grad1.cis.upenn.edu You might want to try using SANE. It has a call, Str2Num(aStr:Str255) which takes a pascal string and returns an extended floating point value. It's very efficient, and has the advantage of supporting not only a "standard" (so, if it has meaning in your program, users can easily enter infinity and other difficult-to-represent numeric notions) but also of being fully script- manager compatible, so that if a eurouser should separate units from decimal portion with a comma instead of a period, it won't choke. The _Apple Numerics Manual_ is the ostensible source for more info, but it's not very helpful. I tend to just browse my SANE headers for the appropriate declarations and work from there. -- --- * --- Nicholas Jackiw Smoke@well.sf.ca.us | Jackiw@cs.swarthmore.edu Key Curriculum Press, Inc. Applelink: D3970 | (415) 548-2304 --- * ---