tiki wrote: > > How to embed a single quote in a text field using /free format. > Thanks. > txtfle = %trim(address1) + "'"; This doesnt worked. txtfile = %trim(address1) + ''''; or D quote c '''' txtfile = %trim(address1) + quote; When you want to code a quote within a literal, you have to use two quotes. If you wanted to get "Joe's Eats" you would code txt = 'Joe''s Eats';
Unconfigured Ad Widget
Collapse
Single Quote
Collapse
X
-
Single Quote
Glenn McClenny wrote: > > Define a quote as a constant using a hex value > > Code <'http://www.mcpressonline.com/mc/showcode@@.6b3a09fb/2'> Using hex literals for "ordinary" characters is not portable to other platforms. If your code is ever used on an ASCII system (say with VA RPG), it will not work. (Even if _your_ code is never used for VA RPG, a VA RPG programmer might read your tip and think it would work.) Defining a named constant is great, but define it with ordinary RPG syntax ('''') rather than the mysterious x'7D'.
Comment
-
Comment