Marco,
You need to look at the result (in this case, 6.71509648127128E-02)
and see if you have an 'E', if so, you need to unconvert the scientific
notation before formatting. That will work in both systems.
IF INDEX(RESULT,'E",1) THEN
GOSUB CONVERT.SCINOTE
END
PRINT FMT(RESULT,'R9')
END
...
SCINOTE:
SCIBASE = OCONV(RESULT,'G0E1')
SCIFACT = OCONV(RESULT,'G1E1')
IF SCIFACT < 1 THEN
SCIBASE = SCIBASE / '1':STR('0',ABS(SCIFACT))
END ELSE
SCIBASE = SCIBASE * '1':STR('0',ABS(SCIFACT))
END
RETURN
Forgive me if this has errors, It's 3:42 AM here, but you get the idea.
- Chuck "Government Enough For Close Work" Barouch
Marco Manyevere wrote:
I'm processing numeric data from an excel spreadsheet using jbase and the statement PRINT FMT('6.71509648127128E-02', 'R9') gives non numeric value when numeric expected.
I have compiled the same statement into a Universe test program and I'm getting the expected result of 0.067150965.
Does anyone have suggestions how to get the correct result in jbase? I'm
reading the excel values using an ADO driver interface and have no way of
changing how the data is presented to me from the interface.
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/