Hallo Martin, Du schriebst am Sat, 9 Nov 2013 07:41:13 +0100:
> Why? We don't talk about Pascal. I often see errors in programs because > of wrong 0/1 array starting index. Oberon doesn't have it either: That's due to the early C exposures people suffer these times. You require theater seat numbers to start at 0 for each row as well? > Currently arbitrary array bounds are back because of IvankoBs argument > with the performance gain by addressing by base Register. There's no performance gain, there's just no performance _difference_ between 0-based and arbitrary-based arrays - and there's no need of a "base register" of any kind. Just have the compiler shift the (imaginary) base address of the array where the (imaginary) element 0 was, and have it check the bounds correctly, then you can do index calculations totally without regard of the starting index. This clever implementation detail was stated in some book about compiler design I happened to read some time, at about the eighties of the last cenury of the last millennium, IIRC. > > > arty = array[10] of snum32; > > > > Urghh. > > > Why? Because it looks like C and C is evil? It's not Pascal. But... > The name is MSElang. :-) .. if you don't want to implement a Pascal compiler anyway, and don't want to support programmer friendly constructs (especially for those who have to pick up where others left off), that's totally acceptable for the task. In addition, it's makes implementing the compiler (look) easier. The price is paid by the programmer, who has to repeat index shifts over and over again, hugely in(?)creasing the performance, of course. > BTW, the Wiki is a work in progress, you should have a look before I don't like this "wiki" stuff. I'm not really sure why, but probabely because of its fleeting and unsteady nature. (That's what cost Wikipedia much reputation.) -- -- (Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem) ----------------------------------------------------------- Mit freundlichen Grüßen, S. Schicktanz ----------------------------------------------------------- ------------------------------------------------------------------------------ November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk _______________________________________________ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk