|
--- "Haas, Matt" <Matt.Haas@thomsonlearning.com> wrote: > Dan, > > If character 2048 is an apostrophe, you're telling > it to start scanning at character 2050. You need to > test nPos before your %scan to make sure it isn't > larger than the length of InString. This is where it gets a little confusing to me. I never get to 100, let alone 2048. If you notice, the argument being passed to the procedure uses a "String" field (one array element) that has a length of 100. The String values are far less than 100 characters. I do not have experience with VARYING type fields. Someone on this list provided the guts of the procedure I'm using (Bob Cozzi???) and it worked fine until I had a situation where the last non-blank character in the string is an apostrophe. I suppose the %trim affects the size of the value being passed to the procedure, but if I don't trim it, I'll get the same error anyway. Hmmm. I experimented a bit and found that if I concatenate a blank to InString at the beginning of the procedure: c Eval InString = InString + ' ' and then replace the following Eval (just before the Return): c Eval InString = OneQ + InString + OneQ with: c Eval InString = OneQ + %trimr( InString ) + OneQ Everything works beautifully now. I still don't have a great grasp of the varying field concept, but I think I have an idea why it didn't work before and now it does, with the changes I made. Thanks, Dan __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com
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.