TIP: Click on subject to list as thread! ANSI
echo: paradox
to: ALL
from: GARY MCQUIGG
date: 1995-05-16 01:30:00
subject: ROUND() FUNCTION

Date: 5/15/95
From: Gary Mcquigg
To: All
Subject: P4W 5.0 Round()
 
Could some one demonstrate an example of the Round() function.
I do a Calc in a query; Calc Miles (Integer)*.275+Parking (,2)
as Total Paid. Total Paid displays rounded but its not that easy
as the sums in reports use the unrounded values. My attempts to 
solve this with ObjectPal have met with failure.
 
This is what I thought should have worked, it didn't.
Please laugh quietly :-), this is only my second try at ObjectPal.
 
method pushButton(var eventInfo Event)
        var
                roundMe                Number
                myTab                Table
                myTC                TCursor
                myQuery                Query
                tv                         TableView
                custRpt         Report
        endVar
 
myTab.attach(":PRIV:ANSWER.DB")
myTC.open(myTab)
scan myTC:
roundMe = myTC."Total Paid"
        format("W.2",roundMe.round(2))
endScan
 
Am I even close?
Thanks for your help.
--- ConfMail V4.00
---------------
* Origin: YABBS,Bellevue Ne, 1:285/29 HST/DS/V.32bis 402-293-9065 (1:285/29)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.