HP3000-L Archives

June 2001, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Wonsil <[log in to unmask]>
Reply To:
Date:
Mon, 18 Jun 2001 15:36:43 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (54 lines)
Al,

Have you checked out the Floor Function:

FLOOR
Rounds an integer down.
Syntax
FLOOR(numeric-expression)
numeric-expression
Specifies the input number.
This function is commonly used to round monetary values down to
the nearest integer.
Input Type: Numeric
Function Result: Numeric
Discussion
The FLOOR function decreases a fractional value to the next lowest
integer. Whole numbers are not decreased.
Examples
Input: FLOOR(79.04)
Result: 79
Input: FLOOR(-34.44)
Result: -35
Input: > DEFINE ITEMX NUM*8 = FLOOR(45.6 + .5)
Result: 46

Now, you may have to multiply the value by an appropriate value (to move the
decimal) to get the correct results.

HTH,

Mark Wonsil
4M Enterprises, Inc.


-----Original Message-----

This was posted to the powerh-l list earlier...I haven't heard anything, so
forgive the cross/post.....

It Must Be Monday....!

I have these fields:
A num*12 pic '^^^^^^^^^.^^' = 82206     (dollar amount - $822.06)
B num*12 pic '^^^^^^^^^^^^' = 41593    (net weight in my applic)
C num*12 pic '^^^^^^^^.^^^^' = (A/B)

The value of C, reported out scale 2 is .0198 (so far so good)

My 'challenge'....to transform this value of C <.0198>
                         into <.019>

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2