|
Dang so PHP runs so much better on other platforms??? It runs on the i5 too...duh Thanks, Tommy Holden -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Steve Richter Sent: Thursday, September 07, 2006 10:26 AM To: Midrange Systems Technical Discussion Subject: **SPAM** Re: Performance of ODBC vs. other access methods On 9/7/06, George Kinney <GKinney@xxxxxxxxxxxxxxxx> wrote:
Steve Richter wrote:How much better would RPG be if its arrays were boundless, the index could be a key value and each entry of the array could itself contain a boundless array? It would be great, but it takes a lot of CPU to support such a thing.If it takes a lot of CPU to support, then why am I provided with
simple access to >such data structures on my PC via several languages: Python, Ruby, Java, C++, >C#, etc? (even though they all call them different names) because the PC and Unix platforms that run those languages have the CPU power to run them. The as400 is the only hardware platform that is deliberately unpowered and is the only one that does not use the languages everyone else uses.
A 'boundless' array is just a linked list, and providing keyed access
to the entries > just requires adding a hash-table to marry up the keys with the list indicies. here is PHP code that loads an array: $states = array( "Ohio" => array( "population" => "11,353,140", "capital" => "Columbus" ), "Nebraska" => array( "population" => "1,711,263", "capital" => "Omaha" )) to access the population of Ohio: echo "<br>population of Ohio " . $states["Ohio"]["population"] In PHP the key can be either numeric or associative. RPG does not have this feature because it requires more CPU than marketing is willing to sell.
You *could* easily implement all this in ILE RPG, even though it'd be
nice if the compiler provided a couple of key words to hide the gory implementation details.
But there really is no reason to since its been possible to implement
all this via >plain vanilla indexed physical files all along. the problem George is it takes a lot of time and effort to create a physical file and code the RPG to access the table by key when all you want to do is sort a subfile. -Steve
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.