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



Personally, I found the C style switch statement kinda limiting, with the 
Pascal/RPG giving me a lot more leeway.

A lot easier to say:
Select
When CondA = '1' And CondB = 2
  ... do this...
etc..

Then have to code:
Switch CondA
Case '1':
   If CondB = 2
      ... do something...
etc...

The first, IMO, is easer to understand.

You are right, though, I think that compiler design decisions are not as much 
influenced by speed of execution but by becoming as high level as possible.  
Everyone knows (or should) that Objects are no wear near optimized for speed.

Regards,

Jim Langston

-----Original Message-----
From: Hans Boldt [mailto:boldt@ca.ibm.com]

No argument there.  When the SELECT statement was being designed,
there was IMHO a bad case of "creeping featuritis" going around in
the RPG/400 team.  (That was when I was busy with the SAA RPG
compiler.) Initially, the intention for SELECT was something like a
Pascal style case statement or C style switch statement.  In those
statements, you get a fast selection of the alternative, since it's
usually implemented by a simple table lookup.  But functionality won
out over performance considerations.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.