|
This is why is use the hex constant: Use a hex constant x'7D' for a single quote and concatenate or move as needed. Something like the following: D SQUOTE C x'7D' C eval @Animal = 'aa' + squote + 'rdvark' Donna Bryant, CCP Peek Software Services, Inc Savannah, Ga (912) 598-9245 www.peeksoft.com ----- Original Message ----- From: "David Keck" <dkeck@idt.net> To: <MIDRANGE-L@midrange.com> Sent: Monday, August 28, 2000 6:16 PM Subject: Re: How to insert a character in a string in RPGLE > 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 > +--- +--- | 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 mailing list archive is Copyright 1997-2025 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.