|
Try: return %subst(F1 : 1 : inLen); -----Original Message----- From: rpg400-l-admin@midrange.com [mailto:rpg400-l-admin@midrange.com] On Behalf Of JJW Sent: Monday, November 25, 2002 10:27 AM To: rpg400-l@midrange.com Subject: Re: Passing By Reference Here's the code that has the problem with the pointer not set. H nomain * -------------------------------------------------------------------- H debug(*YES) H option(*SRCSTMT) * -------------------------------------------------------------------- /COPY *libl/sanfords,elimpr * -------------------------------------------------------------------- * B E G I N P R O C E D U R E * P prREMOVE B Export * -------------------------------------------------------------------- D prREMOVE PI 32766 Opdesc D F1 32766 Options(*varsize) D C1 1 Const * -------------------------------------------------------------------- D CEEDOD PR D ParmNum 10I 0 Const D 10I 0 D 10I 0 D 10I 0 D 10I 0 D 10I 0 D 12A Options(*omit) * ------------------------------------------------- D DataType S 10I 0 Inz D DescInfo1 S 10I 0 Inz D DescInfo2 S 10I 0 Inz D DescType S 10I 0 Inz D InLen S 10I 0 Inz * ------------------------------------------------- /free CEEDOD(1:DescType:DataType:DescInfo1:DescInfo2:InLen:*omit); If InLen <> *Zeros AND C1 <> *Blanks; Dow (%scan(C1:F1) > *Zeros) AND (%scan(C1:F1) <= InLen); F1 = %replace('':F1:%scan(C1:F1):1); endDO; endIF; Return F1; /end-free prREMOVE E _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
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.