View previous topic :: View next topic
|
Author |
Message |
Marcos_Rodrigues
New User
Joined: 18 Aug 2006 Posts: 5
|
|
|
|
Hi everyone !
Can i round a easytrieve field?
For example.. i have a 6 bytes numeric field like 10,098 and i wanna to round these for 10,1
anyone know how to do this ?
Thx! |
|
Back to top |
|
|
MFRASHEED
Active User
Joined: 14 Jun 2005 Posts: 186 Location: USA
|
|
|
|
Rounding Examples is EZTRIEVE
Assuming that a program contains the following field definitions:
SNDFLD W 5 N 2 VALUE (10.75)
RCVFLD W 5 N 1
Then:
Assignment Statement RCVFLD Result
RCVFLD INTEGER ROUNDED = SENDFLD 11.0
RCVFLD INTEGER TRUNCATED = SENDFLD 10.0
RCVFLD INTEGER = SENDFLD 10.0
RCVFLD ROUNDED = SENDFLD 10.8
RCVFLD TRUNCATED = SENDFLD 10.7
RCVFLD = SENDFLD 10.7
INTEGER, ROUNDED, and TRUNCATED are valid only with numeric fields.
Change RCVFLD definition to get required ROUNDING. |
|
Back to top |
|
|
|