|
|
|
Hi Jerry,
So I'm thinking (always dangerous), "Oh, *Zeros is a character field." But, then, I remembered another line in this same program (and similar lines in tons of other programs: w#ladj = *Zeros;
Hmmm...When I think of *Zeros, I don't think of it as being the same thing as the number 0.
You see, *Zeros is neither character nor numeric. *Zeros is a special value that tells the computer to fill the entire field (no matter what the data type) to zeroes. The compiler may generate different code, depending on the data type.What sort of code would it generate when it's only one of many operands in an expression? That's where it gets murky. There's no field to set to all zeroes, is there? It's an expression, not a simple assignment where there's a particular field to set.
You have this: w#ladj = *Zeros - dlsqty * dlstks;I know it means "fill the whole field with zeroes" but there isn't really a field for it to fill! I suppose it might fill the intermediate result with zeroes before moving on to the next step... But, I don't find it intuitive.
Anyway... I don't have a solution (other than using 0 in place of *Zeroes, which you've already done) but I thought you might find this perspective interesting.
This mailing list archive is Copyright 1997-2010 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact