Path: utzoo!utgpu!watmath!att!tut.cis.ohio-state.edu!purdue!bu-cs!dartvax!eleazar.dartmouth.edu!earleh
From: earleh@eleazar.dartmouth.edu (Earle R. Horton)
Newsgroups: comp.sys.mac.programmer
Subject: Script Manager compatible atof()?
Message-ID: <14919@dartvax.Dartmouth.EDU>
Date: 8 Aug 89 20:13:41 GMT
Sender: news@dartvax.Dartmouth.EDU
Reply-To: earleh@eleazar.dartmouth.edu (Earle R. Horton)
Organization: Thayer School of Engineering
Lines: 23


     I have a program which solicits floating point values from the
user.  Usually I use a modeless dialog editText item for this purpose,
with the font in the dialog being a user-configurable variable.  This
is not a high-volume-input program, but rather needs to obtain maybe a
half-dozen floating point values to use as parameters to a simulation.

     I have been looking at the Script Manager 2.0 documentation
recently, and it seems that it would be really neat to be able to use
it to parse any locally-valid floating point representation.  It does
seem to be a rather complicated package, however, with about the same
degree of complexity as the Macintosh File Manager, and I scarcely
would know where to start if I wanted to use it for my rather simple
requirements.

     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.  Has anyone done this, or
(hopefully) have example code?  My plans at present include writing
output data as either binary or ASCII digits, but hey, I wouldn't turn
up my nose at any output routines, either.

Earle R. Horton