× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



No. RPG does not allow you to pass values that are not the same type as the
procedure expects.
This is a very big :(

Bob


-----Original Message-----
From: rpg400-l-bounces@midrange.com [mailto:rpg400-l-bounces@midrange.com]
On Behalf Of Dan
Sent: Monday, February 10, 2003 5:50 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: "If %scan(x:y)" is not valid???


--- jrc@e-masi.com wrote:
> >> if    date = %range( 20030101 20030201 )
> >
> >YES!  I would go for this.
> 
> If you would go for this, then write it!
> 
> A function like this would be simple to write and could be easily 
> incorporated into your code:
> 
> Write a sub-routine called inDateRange.
> Send it 3 parameters, testDate, BegDate and EndDate.
<snip>

Actually, I was thinking of something more generic, where the arguments
could be any data type (all three the same data type).  

So, one could use:
   c           If     inRange( Grade : 'A' : 'D' )
   c           If     inRange( Salary : 25000 : 80000 )
   c           If     inRange( Date : d'2002-07-01' : FinalDate)

Also, the %list function would be nice as well, but to be truly useful, it
would have to accomodate a variable number of arguments, as well as deal
with any data type:
   c           If     inList( Status : 'A' : 'D' : 'P')
   c           If     inList( someNumber : 1 : 4 : 6 : 10 : defaultNumber )

Is it possible to do that?

- Dan

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com _______________________________________________
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/mailman/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 thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.