|
Hi Barbara, I just opened a problem report if that is of any help. As far as the 'needle' is concerned... why not return 0 as well ? Kind regards, Paul -----Original Message----- From: bmorris@ca.ibm.com [mailto:bmorris@ca.ibm.com] Sent: 19 March, 2002 20:05 To: rpg400-l@midrange.com Subject: Re: %Scan (Again...) >Date: Tue, 19 Mar 2002 10:38:49 -0500 >From: "Nicolay, Paul" <paul_nicolay@merck.com> > >I recently posted a message that I had some doubts that the behaviour of >%SCAN changed. > >Barbara or Hans replied that it was more flexible now, and didn't fail >anymore when the search argument was bigger than the actual string. > >While this change is great (it saves me an extra test), I now found out that >%SCAN still bombs when the actual string is empty ? Why not just return 0 ? Paul, I agree that when haystack is empty, %scan(needle:haystack) should just return zero, without an error. (Although I think it should continue to give an error when needle is empty.) You are right, this _is_ annoying - by coincidence, I just ran into it yesterday. Without an APAR, I can't promise a PTF for this. Barbara Morris _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
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.