× 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.



I guess I phrased that incorrectly :) I was not implying that the exact
same code would work in both cases.....just the logic would be
similar.....nonetheless I stand corrected Joe :)




From:
Joe Pluta <joepluta@xxxxxxxxxxxxxxxxx>
To:
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
Date:
06/23/2008 12:20 PM
Subject:
Re: Advantages of RPG



Doug Palme wrote:
Could one also use a function / procedure such as:

Select;
When MyFunction() = 1;
Exsr Exitprocess;
EndSL;

which I believe would also work with either VB or C.......then again I
do
not recall ever having tested that......

Again, I am not disagreeing with you.....just making an observation :)

Your syntax above does not work in any Microsoft language. The closest
you can get is this VB code:


myvalue = MyFunction()
Select Case myvalue
case 1
Exitprocess()
case 2 or 3
Process2Or3()
End Select


See Tommy's comment as well. VB's Select Case syntax is very primitive
compared to RPG's SELECT. And C# is even worse; it's the original C
switch statement.

Joe

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.