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)
|