Post Reply 
ROUND instruction not working as expected
05-01-2016, 05:05 PM
Post: #10
RE: ROUND instruction not working as expected
(05-01-2016 01:57 AM)Bob Frazee Wrote:  EXPORT roundfail()
BEGIN
LOCAL fail;
fail:=1.23456;
fail:=ROUND(fail,2);
END;

In the above example:
The previous firmware version would display 1.23
The present version firmware displays 1.2300

Hope this makes it more clear.

Hello,

This is what is happening:

In the old firmware, your results would be displayed always with STD on entry to the INPUT form regardless of your system settings. However, when you entered another number, or modified to one in there, it would parse and store the result string with the system setting. You observe this by this simple experiment:

A:=123.456789
INPUT({A,B})

When you first enter, your values are shown as STD with all digits. Press EDIT and then ENTER to edit A again, and you'll note how A will now display in FIX 4. In other words, only on first entry did it show as STD - else it would follow your system settings.

The new firmware corrects this arguably incorrect behavior. It follows your system settings just like everything else in the system. If you really would like it to show only 2, I'd recommend putting the display to FIX 2 before your start your INPUT, and restore it after.

Does this make sense? Any further concerns?

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: ROUND instruction not working as expected - Tim Wessman - 05-01-2016 05:05 PM



User(s) browsing this thread: 2 Guest(s)