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



The IBM idea has been submitted under ID IBMI-I-4166.
Please vote your preference: YES or NO.

Thanks.
JS


El mié, 31 jul 2024 a las 19:52, Javier Sanchez (<
javiersanchezbarquero@xxxxxxxxx>) escribió:

The elegance of a BIF would prevent you from writing the extra code.
I already use a variable that's 2048 bytes long initialized with all
blanks, and then take a substring of it to concatenate the main string with
the blanks that I need. I also use a similar variable filled with stars
and tabs, and I do the same. Wouldn't it be useful if a BIF gives you that?

JS


El mié, 31 jul 2024 a las 12:52, Jon Paris (<jon.paris@xxxxxxxxxxxxxx>)
escribió:

Just for fun ...

dcl-s blanks char(40) Inz;
dcl-s x char(30);

x = 'A' + %Left( blanks : 10 ) + 'B';


Jon P.

On Jul 31, 2024, at 2:46 PM, Justin Taylor <jtaylor.0ab@xxxxxxxxx>
wrote:

I ran this completely unscientific comparison.

startTime = %timestamp();
For x = 1 to 1000;
gResult = ' ' + BASE + ' ';
Endfor;
endTime = %timestamp();
charOut = %char( %diff(endTime :startTime :*ms) );
Dsply charOut;

startTime = %timestamp();
For x = 1 to 1000;
EXEC SQL set :gResult = space(5) || :BASE || space(5);
Endfor;
endTime = %timestamp();
charOut = %char( %diff(endTime :startTime :*ms) );
Dsply charOut;

Results for 2 runs:
DSPLY 39
DSPLY 12531

DSPLY 63
DSPLY 13600
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related questions.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.