|
Hi Tim, > I must be brain dead, but I cannot figure out why this (PtRtrv) won't > compile. "Subr" is defined as 14A, fixed-length. Low2Up() only accepts VARYING fields as parameters. If you define the parameter to Low2Up as a CONST or VALUE parameter, the compiler will automatically convert the value for you. That's a good way to do this, since you're not returning the results via the parameter anyway, you're returning them via the return value. Passing the input parameter by CONST will make this routine more versatile when you want to call it from other programs where they might or might not use VARYING. Here's how I'd code the Low2Up() procedure. (Remember to change the prototype to match!) P Low2Up B Export D Low2Up Pi 1000A Varying D String Like(Low2Up) const D Options(*Varsize) D Upper C 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' D Lower C 'abcdefghijklmnopqrstuvwxyz' D RetVal s like(Low2Up) /free RetVal = %XLate(Lower:Upper:String); Return RetVal; /End-Free P Low2Up E
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.