Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!apple!motcsd!hpda!hpcuhb!hpcllla!hpclisp!hpclscu!shankar From: shankar@hpclscu.HP.COM (Shankar Unni) Newsgroups: comp.sys.hp Subject: Re: HP9000 Pascal Buglist / Wishlist Message-ID: <1340075@hpclscu.HP.COM> Date: 5 Oct 89 22:41:38 GMT References: <2258@mva.cs.liv.ac.uk> Organization: Hewlett-Packard Calif. Language Lab Lines: 87 > 1. Extremely large executable size (On Series 800 machines only) > ------------------------------- Well, this is sort of a misfeature, especially considering that Pascal does not guarantee initialization at load time.. This has been reported more than once, but I'm not sure if a fix is forthcoming in the *near* future, since it's so easy to work around (after all, how many of these arrays do you have? You could easily "new" this arrays on the heap). > 2. Otherwise clause in a Case statement is compulsory at run-time > -------------------------------------------------------------- All for the sake of the "Pascal" spirit. We try to catch as many exceptions as possible, and according to the Pascal standard, this is an error, and quality implementations must catch it. I therefore don't consider this a bug, but consider the other compilers buggy in not catching this. > 5. The + operator for strings is fussy about its operands > ------------------------------------------------------ I agree. It could be a little more flexible. > The rest of these points are a wishlist for HP Pascal: > 1. Array slicing > ------------- > var fred : array [ 1..7 , 1..7 ] of integer ; > begin fred [ 1 , ] := fred [ 2 , ] end ; { OK, so it's uninitialised... } Actually, the syntax for that is fred[1] := fred[2]; I.e., if fred is a 2-d array, fred[1] is a one-d array, and fred[1,1] is an element. > 2. Constant assignment to arrays (and other types ?) in the var section > -------------------------------------------------------------------- > var fred : array [ 1..2 , 1..2 ] of integer := > ( ( 17 , 6 ) , ( 13 , -2 ) ) ; There is an ugly way of doing this (at least in the 800 pascal): Name each subtype of fred explicitly: type oneDarray = array[1..2] of integer; twoDarray = array[1..2] of oneDarray; var fred : twoDarray; const fred_init = twoDarray [ oneDarray [17, 6], oneDarray [13, -2] ]; begin fred := fred_init; /* initialize at one shot */ end. There is still no way to initialize at compile-time, but this is better than nothing.. > 3. Access to external ints in C library routines > --------------------------------------------- This is one of the sore points. Both Pascal's provide ways to do this, but they both rely on tricks of the implementation, and they are incompatible with each other, so I won't waste your time telling you about them. > As I think has already been mentioned, it is clear that Series 300 and Series > 800 Pascal are written by different people within HP. This does lead to Gee, how did you guess? :-) Seriously, though, there are strenuous efforts under way to converge them to a common base. Your suggestions are valuable for this exercise. If you have any sort of an HP support contract, please also report any problems you find to your HP support rep, so that *you* can be sure that they are officially logged and recognized. I'll forward these comments to the Pascal team in any case. P.S.: there is an ANSI committee currently working (in the late stages) on a standard for "Extended Pascal", which will give you most of what you wished for above. The committee is X3J9. See if you can get a copy of the draft from somewhere. Let your HP rep know if you're interested. ----- Shankar Unni ("ex-Pascal grunt") E-Mail: Hewlett-Packard California Language Lab. Internet: shankar@hpda.hp.com Phone : (408) 447-5797 UUCP: ...!hplabs!hpda!shankar