× 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.



Do you want to fill a variable with 5 '*'? Then do this:

MyFld = *All'*;

If you want to print something 5 times, use Except (internally descibed
printer file) or Write (externally described printer file) in a loop.

> -------- Original Message --------
> Subject: Re: Function to repeat Char  n times >
> From: "Luqman" <pearlsoft@xxxxxxxxxxxx>
> Date: Wed, December 14, 2005 8:09 am
> To: rpg400-l@xxxxxxxxxxxx
> 
> I could not understand this, is this a RPG 400 Function ?
> 
> How can I use this to print '*' 5 times.
> 
> A single line of code will be appreciated, please.
> 
> Best Regards,
> 
> Luqman
> 
> 
> 
> <michael@xxxxxxxxxxxxxxxxxx> wrote in message
> news:20051214053842.1cba8986f1dca4f8555220876195c2e0.c31ba4494b.wbe@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> *ALL..
> 
> *ALL'x..'
> Character/numeric fields: Character string x . . is cyclically repeated
> to a
> length equal to the associated field. If the field is a numeric field,
> all
> characters within the string must be numeric (0 through 9). No sign or
> decimal point can be specified when *ALL'x..' is used as a numeric
> constant.
> Note: You cannot use *ALL'x..' with numeric fields of float format.
> Note: For numeric integer or unsigned fields, the value is never greater
> than the maximum value allowed for the corresponding field. For
> example, *ALL'95' represents the value 9595 if the corresponding
> field is a 5-digit integer field, since 95959 is greater than the
> maximum value allowed for a 5-digit signed integer.
> Constants
> *ALLG'oK1K2i'
> Graphic fields: The graphic string K1K2 is cyclically repeated to a
> length
> equal to the associated field.
> *ALLU'XxxxYyyy'
> UCS-2 fields: A figurative constant of the form *ALLU'XxxxYyyy'
> indicates
> a literal of the form 'XxxxYyyyXxxxYyyy...' with a length determined by
> the length of the field associated with the *ALLU'XxxxYyyy' constant.
> Each
> double-byte character in the constant is represented by four hexadecimal
> digits. For example, *ALLU'0041' represents a string of repeated UCS-2
> 'A's.
> *ALLX'x1..'
> Character fields: The hexadecimal literal X'x1..' is cyclically repeated
> to a
> length equal to the associated field.
> *NULL
> A null value valid for basing pointers or procedure pointers
> *ON/*OFF
> *ON is all ones ('1' or X'F1'). *OFF is all zeros ('0' or X'F0'). Both
> are only
> valid for character fields.
> 
> > -------- Original Message --------
> > Subject: Function to repeat Char  n times >
> > From: "Luqman" <pearlsoft@xxxxxxxxxxxx>
> > Date: Wed, December 14, 2005 4:39 am
> > To: rpg400-l@xxxxxxxxxxxx
> >
> > Which function in RPG ILE repeats the character n Times, like Replicate
> > function in Foxpro ?
> >
> > For example:
> > Replicate('*',2) will print '*' 2 times.
> >
> > Best Regards,
> >
> > Luqman
> >
> >
> >
> > -- 
> > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> > To post a message email: RPG400-L@xxxxxxxxxxxx
> > To subscribe, unsubscribe, or change list options,
> > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> > or email: RPG400-L-request@xxxxxxxxxxxx
> > Before posting, please take a moment to review the archives
> > at http://archive.midrange.com/rpg400-l.
> 
> -- 
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
> 
> 
> 
> 
> -- 
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> 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 thread ...


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.