Xref: utzoo comp.sys.mac.programmer:11654 comp.sys.mac:45965 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!purdue!bu.edu!bu-cs!dartvax!eleazar.dartmouth.edu!boz From: boz@eleazar.dartmouth.edu (John Boswell) Newsgroups: comp.sys.mac.programmer,comp.sys.mac Subject: StringToReal? Message-ID: <18429@dartvax.Dartmouth.EDU> Date: 11 Jan 90 03:00:13 GMT Sender: news@dartvax.Dartmouth.EDU Followup-To: comp.sys.mac.programmer Organization: Dartmouth College, Hanover, NH Lines: 27 Hi. I am trying to write an epr simulation program using Prototyper to generate the Mac User-interface. I have the simulation code that actually does the numbercrunching working nicely, and thought I'd put a nice interface on the program, letting Prototyper do most (all? or is that being to hopeful?) of the work. I have run up against a little problem with data entry: I made a dialog box in Prototyper to allow the user to enter in all the numerical parameters the user needs to run the simulation. I generated the Pascal code, and compiled the sucker in Think Pascal. The problem is that the call that actually gets the info from 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? Or, is there a way to get real-types *directly* from the dialog? Since the dialog approach would be the best interface for entering parameters, and I *know* *lots* of programs use that way for entering data, I'd be *greatly* appreciative if anyone could steer me in the right direction! Thanks in advance, -- ************************************************************************* John Boswell boz@eleazar.dartmouth.edu Dept. of Chemistry boz@dartCMS1.BITNET Dartmouth College, Hangover, Nude Hampster 03755