|
On Wed, 5 Jan 2005 14:12:48 -0500, Paul Morgan <pmorgan@xxxxxxxxxxxxxx> wrote: > Barbara, > > After a little thinking/research here's a couple of benefits: > > 1) Some built in functions won't accept a constant value but require a > variable. %SUBDT is an example. > > 2) Different results from %LEN or %SIZE BIFs. The constant would give me > the length/size of the constant value. The variable would provide the > length/size of the variable which would be different than the constant value > stored in that variable. (are these BIFs resolved at compile time or run > time?) > > 3) The variable could be used in a LIKE definition. (but if type and length > are not exported then this won't work) > > 4) You could pass the variable as a parameter to a subprocedure which > requres a 'by reference' variable. > > I'd also like to mention the possibility of Reflection APIs on service > programs if variable type/length were exported (including procedure > variables). Could do some very interesting things with that API. what are the reflection APIs? on the broader topic of exporting of variables, isnt it always better for a module to provide a set of exported procedures that allow controled access to a global variable in a module? Such a procedure, like "GetGlobalVariable" would make the global variable accessible to any other procedure or program. not just to to procedures within the same service program. -Steve
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.