Scott Klement wrote:
For a subprocedure? A reusable service that can be called from anywhere? I'd love to have it be able to use that parameter as any different data type!

As a trivial example, consider a procedure that inputs a date in MMDDYY format and outputs it in YYYYMMDD format. wouldn't it be nice if the input value could be a date field, character string, unicode string, zoned decimal, packed decimal or integer field? So I don't have to code a separate procedure for every single input type?
That's not quite the same thing, Scott. You're talking about essentially overloading the procedure by allowing different types of variable as a parameter (which you can do today by simply passing a pointer and a flag which indicates the variable type). With dynamic typing, the variable itself has no context; whenever you want to process it, you first have to determine what's in it. And in object-oriented programming it gets even worse because the variable can literally contain an object of any type.

Joe


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.