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


  • Subject: Re: How to insert a character in a string in RPGLE
  • From: "David Keck" <dkeck@xxxxxxx>
  • Date: Mon, 28 Aug 2000 15:16:22 -0700

Some of the other posts are trying to address what they understand to be
your overall problem, so I won't go there.  But yes, quotes are special
characters because that are used as string delimiters, as in
C   eval  @Animal = 'aardvark' ... the quotes don't appear in the variable
@Animal.  If you want the variable @Animal to contain  aa'rdvark  then you
would code
C   eval @Animal = 'aa''rdvark'  ... which is basically to say, code it how
you would like it to look, then go back and change every place where you
want a quote to appear in the string from one quote to two quotes.  When
concatenating fields you could do it this way  ...
C   eval @Animal = 'aa' + '''' + 'rdvark'  ... the apostrophe is like any
other string in that it needs one apostrophe to the left and one to the
right as delimiters.  Then you need the apostrophe itself, which is a
special character, so you have to put two of them, and that makes four
altogether.  ''''   ugly huh ?   -DaveK

----- Original Message -----
From: mariame@SIAMTL.COM
To: MIDRANGE-L@midrange.com
Sent: Monday, August 28, 2000 12:52 PM
Subject: Re: How to insert a character in a string in RPGLE



Hello David,

i've already done what you have explain to me, but my problem that i want to
insert a quote <'> i think it's a special character ????

thanks lot

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.