|
1) Some built in functions won't accept a constant value but require a variable. %SUBDT is an example.
D COOLDATE c d'2005-01-06' D year s 10I 0
/free year = %subdt(COOLDATE: *YEARS); dsply ('Year = ' + %char(year)); *inlr = *on; /end-free
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?
%size() is resolved at compile time, %len() is sometimes compiletime and sometimes runtime, I think.
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.
As an Amazon Associate we earn from qualifying purchases.
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.