× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



By gum, that works quite nicely.  And that 'X' is even on an old O spec
sheet.  Of which a chunk is taped to my wall to help me remember these.

Can this be added as an example in the FAQ?  Actually, this is the first
time I've ever used the 'X' format.

Rob Berendt
--
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
Benjamin Franklin



                    "Peter Dow"
                    <pcdow@yahoo.com>       To:     <rpg400-l@midrange.com>
                    Sent by:                cc:
                    rpg400-l-admin@mi       Fax to:
                    drange.com              Subject:     Re: %CHAR


                    02/21/2002 01:53
                    PM
                    Please respond to
                    rpg400-l






Hi Rob,

Michael Plonka already posted the easier method -- edit code "X":

    c            eval    alpha = %editc(number: 'X')

which should work in free format.

Regards,
Peter Dow
Dow Software Services, Inc.
909 425-0194 voice
909 425-0196 fax

----- Original Message -----
From: <rob@dekko.com>
Sent: Thursday, February 21, 2002 10:29 AM
Subject: RE: %CHAR


>
> Ok, I got it to work.  It just took me awhile to figure out that I needed
> to make the edit work 1 character bigger than the variable.  For example:
>
>      D Alpha           s              5a
>      D edtwrd          c                   '0     '
>      D number          s              5p 0
>       /free
>        number=1;
>        alpha=%subst(%editw(number:edtwrd):2:%len(alpha));
>        dsply alpha; // '00001'
>        number=12;
>        alpha=%subst(%editw(number:edtwrd):2:%len(alpha));
>        dsply alpha; // '00012'
>        number=123;
>        alpha=%subst(%editw(number:edtwrd):2:%len(alpha));
>        dsply alpha; // '00123'
>        number=1234;
>        alpha=%subst(%editw(number:edtwrd):2:%len(alpha));
>        dsply alpha; // '01234'
>        number=12345;
>        alpha=%subst(%editw(number:edtwrd):2:%len(alpha));
>        dsply alpha; // '12345'
>        *inlr=*on;
>        return;
>       /end-free
>
> Rob Berendt
> --
> "They that can give up essential liberty to obtain a little temporary
> safety deserve neither liberty nor safety."
> Benjamin Franklin
>
>
>
>                     Scott Klement
>                     <klemscot@klement       To:     rpg400-l@midrange.com
>                     s.com>                  cc:
>                     Sent by:                Fax to:
>                     rpg400-l-admin@mi       Subject:     RE: %CHAR
>                     drange.com
>
>
>                     02/21/2002 11:14
>                     AM
>                     Please respond to
>                     rpg400-l
>
>
>
>
>
>
>
> I can give you examples of using the C functions to convert numeric to
> character, but I'm not sure they belong in the FAQ.  The RPG BIFs aren't
> lacking in this area, so why add the complexity?
>
> Any particular reason you wanted to use the C functions?
>
> On Thu, 21 Feb 2002 rob@dekko.com wrote:
> >
> > Buck,
> >
> > I was hoping to see the C functions to convert the numeric into
> character.
> > Or am I confused and they're just useful for the other way?
> >
> > Rob asked:
> >
> > >Who is going to whip up the FAQ?
> >
> > Done.  See http://faq.midrange.com/data/cache/184.html or search (lower
> > left) for 'numeric'.
> >
> >   --buck
>

>
>
>
>








As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.