Regards,This message has been edited. Last edited by: Kerry,
WF dev version - 7.6.x
June 09, 2006, 02:37 AM
Mikel
Amper variables formats only can be alphanumeric or integer. After arithmetic operations in Dialogue Manager, the decimal part is truncated. To avoid this truncation, We can convert the result to alphanumeric format using FTOA function.
That worked for the code I had submitted. The problem is that if the result goes beyond 1000 it is not able as there is a comma that gets added to the result. for Example
What I was really having trouble with was the following:-
-SET &C = &A + &B ; (where &A = 2222222222 and &B = 3333333333) The result &C should be displayed as 5555555555 but instead shows as ******** (8 asterisks) therefore by doing :- -SET &D = FTOA(&A+&B, '(D10c)', 'A10'); you get the addition displaying correctly
Cheers...
_______________________ *** WebFOCUS 8.1.05M ***
May 19, 2009, 05:13 AM
<JG>
Just as a point of interest SET DMPRECISION was a new feature in 7.6.1.
May 19, 2009, 11:31 AM
j.gross
Based on a little experimentation, it appears that -SET has two different modes of operation when right-hand-side involves numbers.
1. -SET &var = a string of digits; treats the string of digits as a character expression.
2. -SET &var = an expression involving an arithmetic operator; evaluates the expression, and then effectively formats it using FTOA(result, '(F8)', 'A8'), if DMprecision is zero. If FTOA senses overflow, then '********' is stored in &var. But if result of the expression was out of range (not sure what that range is), the value fed to FTOA is reset to zero.
Parentheses can be either numeric or character operators, depending on context, so they do not of themselves transform the RHS into a "numeric" expression.