|
> From: Larry Bolhuis > > Thank you all. The ',' -vs- ':' argument was very strong but the > biggest problem was that I was trying to use the string function LEFT in > ILE RPG. However there is no such function apparently. And if there were such a built-in function, it would start with a %, as all such built-in functions do. That minimum level of familiarity with the language helps when you use it. > I don't program > much outside of CL these days so when I was in the RSE editor I simply > hit F1 and searched for LEFT. Sure 'nuf there it was so I keyed in the > syntax and attempted a compile. Why would you assume that something you happened to look up in the help would apply to RPG? Far better to use the standard context-assist key combination of Ctrl-space. > I ASSUMED that the help system would > know I was editing RPG and therefore wouldn't tell me about stuff from a > foreign language. Why would you assume that? The Help text is there for the entire tool, as opposed to the context-assist feature, which would have given you only those things which made sense for the current editor. > Of course I was incorrect. Interestingly the help text > doesn't indicate which language the statement applies to at all!! Unless you go to the table of contents link, which tells you that you are in the REXX book. I suppose a title on the top of every page to tell you which language you are in might help, but as I said, you were better off using content assist. > Oh > well the appropriate statement turned out to be this one in Free Form: > > EVAL @IPTRIM = %SUBST(IPAddress:1:%LEN(%TRIMR(@IFC))); I don't much understand this. Since I don't know what @IFC contains and I don't know what IPAddress contains, it's hard to know what this does. But in your original issue, eval IPT2 = %subst(IPT1:1:LN) would have worked just fine. Joe
As an Amazon Associate we earn from qualifying purchases.
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.