# Calculate U.S. first class postage required for a given weight in ounces.
# Copyright (c) 1991-2001 by Hamilton Laboratories. All rights reserved.
proc postage(ounces)
local cost
# Current rate is 34 cents for the first ounce + 21 cents for
# each additional ounce or fraction thereof.
@ ounces = ceil(ounces)
@ cost = .34 + (ounces - 1)*.21
return printf('$%.2f', cost)
end
postage $argv
Hamilton C shell |
Free Updates |
Free Demo Software |
Win32 Training
Y2K |
Customer Testimonials |
On-line Hamilton C shell User Guide
Home |
Email |
Support |
Company Profile |
Distributors |
Links
Copyright © 1997-2001 by Hamilton Laboratories.
All rights reserved.
You are visitor number
408.
This page was last modified August 14, 2001.