>>>>> "RC" == Rob Coops <rco...@gmail.com> writes:

  RC> @Uri, returning 0 or 0.00 does make a small difference in that the
  RC> receiving program likes the 0.00 better then the plain 0 don't ask
  RC> me why ask our mainframe colleagues why. I wish I could let perl
  RC> do the work for me but it simply does not regardless of how I try
  RC> and do it return the "right" numbers when I compare them with the
  RC> numbers in the Uniface system. I have a sample set of a month
  RC> worth of invoices for 1 country and the below code is the only way
  RC> in which I was able to emulate the behaviour of the Uniface system
  RC> in all cases. My feeling is that the Uniface system does the same
  RC> kind of weird trick.

from perl's perspective 0 and 0.0 are the same as long as you deal with
numbers.

perl -le '$x = 0 ; print $x ; $x = 0.00 ; print $x'
0
0

so you can't tell the difference without getting into the guts with xs
or some special code. you mention a receiving program which may make a
difference but again perl won't know or care. there may be more code
than you are showing which makes a difference between the two but basic
perl doesn't know or care.

uri

-- 
Uri Guttman  ------  u...@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to