The new forums will be named Coin Return (based on the most recent
vote)! You can check on the status and timeline of the transition to the new forums
here.
The Guiding Principles and New Rules
document is now in effect.
Hello,
I've been programming in Pick Basic for the past 8 months. Having calculation problems and I can't find any answers in any manuals I've looked at. I have also done numerous google searches and can't find anything. Here is the problem: I have precision 2 in the program. I am doing a simple multiplication x = y*z and I can't get the program to stop suppressing zeroes in my result. I need 2 decimal places in order to download it to the mainframe from unix.
What am I missing? I've tried OCONV - MR2%14 - it will not give me my two decimal places. What option do I need to add?
This simple issue is holding up my project - ACK!
Thanks in advance,
Neal
0
Posts
Do you just want your output to be in 2 decimals?
I'm on D3 (not unidata) but what I'll typically do is ICONV the input, do the math, then OCONV the result.
Ex:
X = ICONV(INPUT1,'MR2')
Y = ICONV(INPUT2,'MR2')
Z = X * Y
PRINT OCONV(Z,'MR2')
If you want leading zeros it'd be (assumingthe syntax is the same)
PRINT OCONV(Z,'MR2') "R(%14)"
http://forums.penny-arcade.com/discussion/182873/programming-thread-numerical-handwriting-errors-accumulate-to-two-hour-delays
Lots of helpful guys in there. I've been doing pickBASIC for just over 10 years now so if you have questions post in there as I frequent it more than H/A