× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Does %DIV's result count as overloading?

"If either operand is a packed, zoned, or binary numeric value, the
result is packed numeric. If either operand is an integer numeric value,
the result is integer. Otherwise, the result is unsigned numeric. Float
numeric operands are not allowed."

--
Saludos
Antonio Salazar

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Dennis Lovelady
Sent: Monday, January 11, 2010 12:38 PM
To: 'RPG programming on the IBM i / System i'
Subject: RE: RPGV?

I suspect that the rules that govern the operation of BIF are
closely
tied to the rules that limit our procedures' abilities.

There are existing precedents of BIFs working in an overloaded
fashion.

For example, the %DEC() BIF can take a Unicode, Alphanumeric, Date,
Time
or Timestamp field as it's first parameter. Indeed, the 2nd parameter
is different for a D/T/Z field than it would be if it were a character
string.

The same is true of the %date(), %char(), %int(), etc, etc BIFs...
they
all can take their input from just about any data type. Something we
can't really do with subprocedures.

Good point, Scott. But I was thinking more in terms of returned-type
overload. Any examples of this would be ... enlightening. :)

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"A conference is a gathering of important people who singly can do
nothing
but together can decide that nothing can be done."
-- Fred Allen


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.