I am trying to convert a string to a float, using the FlpAToF routine as
described in the knowledge base (with gcc). I included NewFloatMgr.h in my
code, and then did the following:

        FlpCompDouble dbl;
        CharPtr foo;
        float val;
        FieldPtr fldP;
        FormPtr frm;

        frm = FrmGetActiveForm();
        fldP = FrmGetObjectPtr(frm, FrmGetObjectIndex(frm, myField));
        foo = FldGetTextPtr(fldP);
        dbl.fd = FlpAToF(foo);
        total = dbl.d;

When I run my program, foo gets set to "4.99" or whatever gets entered in the
text field. dbl.fd as returned from FlpAToF gets set to "{high=0, low=0}"
according to gcc, and total gets set to 0.

Is there anything wrong with the code as I am writing it that would make this
fail?

Thanks in advance,
Tammy

--
Tammy Cravit, MIS Manager
Davies Communications, Inc.
E-mail: [EMAIL PROTECTED]

Reply via email to