Focal Point
foc281

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4931097331

August 05, 2004, 07:25 PM
<Vipul>
foc281
Any Ideas about this:


-* File testneg.fex
-SET &NEGNM = -14977162.91;
-SET &ONEGT = EDIT(0) + EDIT(&NEGNM) ;
-TYPE &ONEGT

Gives me the error: (FOC281) ALPHA ARGUMENTS IN PLACE WHERE NUMERIC ARE CALLED FOR
This is a negative number from the Read on a file.

Thanks,

Vipul

This message has been edited. Last edited by: <Mabel>,
August 05, 2004, 07:36 PM
susannah
well, yeah, i think you're EDITing a number which makes it ALPHA and then you're trying to add together two ALPHA's. Dialog manager doesn't know what you want to do.
August 05, 2004, 07:45 PM
<Vipul>
Even if I take EDIT() off it gives the same error. Like


-* File testneg.fex
-SET &NEGNM = -14977162.91;
-SET &ONEGT = 0 + &NEGNM ;
-TYPE &ONEGT

Vipul

This message has been edited. Last edited by: <Mabel>,
August 05, 2004, 08:40 PM
Vivian
Vipul,

Well, the only way I got this to work was to do a subtraction:

-set &negnum = 0 - nnnnnn ;

and then continue from there. I guess the dash makes it look like an alpha. I even tried the asis function and got the same results.

vivian
August 05, 2004, 08:42 PM
David Sibert
Vipul,

code as follows:

&negnum = 0 - 789766;
&neq = 0 + &negnum ;
-type &neq

works.

David
August 05, 2004, 08:54 PM
<Vipul>
Thanks David, it works but is there a limit on the size as if you do this (basically change your number), this does not work

-SET &negnum = 0 - 1497716;
-SET &neq = 0 + &negnum ;
-TYPE &neq
-RUN


Vipul
August 05, 2004, 09:09 PM
<Pietro De Santis>
You could try FTOA:


-* FILE TESTNEG.FEX
-SET &ECHO=ALL;
-SET &NM = 14977162.91;
-TYPE &NM
-SET &ONEGT =FTOA(0-&NM , '(D12.2c)', A15);
-TYPE &ONEGT

(D12.2c - Lower case c to suppress the thousands commas)

This message has been edited. Last edited by: <Mabel>,
August 05, 2004, 09:45 PM
<Vipul>
Thanks Pietro

This will work.

Vipul