p. ASCAl US£fI'S6tOUP' . 8MBER 2lJ COMMUNICATIONS ABOUT THE PROGRAMMING LANGUAGE PASCAL BY PASCALERS APRIL} 1981 If this isn't APRIL... - - - - . '.. ." .. does that mean we're late? ~ I ' T. EX LIBRIS: David Craig 736 Edgewater ~ [8 ] Wichita, Kansas 67230 (USA) POLICY: PASCAL NEWS (15-Sep-801 * Pascal!!!!!! is the official but informal publication'of the User's Group. . * Pascal News contains all we (the editors) know about Pascal; we use it as the vehicle to answer ~81l inquiries because our physical energy and resources for answering individual requests are finite. As PUGgrows, we unfortunately ~uccumb to the. reality of: 1. Having to insist -that people who need to know "about Pascal" join PUG and read Pascal News that is why we spend time to produce it! - 2. Refusing to return phone calls 'or answer letters full of questions we will pass the questions on to the readership of Pascal News. Please understand what the collective effect of individual inquiri~as at the "concentrators" (our phones and mailboxes). We are trying honestly to say: 0 "Wecannot promise more that we can do." Pascal News is produced 3 or 4 times during a year; usually in March, June, * September;-and December. * ALL THE NEWS.THAT'S FIT, WE PRINT. Please send material (brevity is a virtue) for Pascal -News single-spaced and camera-ready (use dark ribbon and 18.5 em lines!) ~ ;* Remember: ALL LETTERS TO US WILL BE PRINTED UNLESS THEY CONTAINA REQUEST () o TO THE CONTRARY. -.- * Pascal News is divided into flexib!e sections: o - POLICY explains the way we do things (ALL-PURPOSE COUPON, etc.) - Q. EDITOR'S CONTRIBUTION passes along the opinion and point of view of the editor together with changes in the mechanics of PUGoperation, etc. - HERE AND THERE WITH PASCAL presents news from people, conference announcements and reports, new books and. articles (including reviews), riotices of Pascal in the nsows, history, membership rosters, etc. - APPLICATIONS presents and documents source programs written in Pascal for various algorithms, and software tools.. for a Pascal environment; news of significant applications programs. Also critiques regarding program/ algorithm certification, .performance, standards conformance, style, output convenience, and general design. - ARTICLES contains formal, submitted contributions (such as Pascal philosophy, use of Pascal as a teacbing tool, use of Pascal at different computer installations, how to promote Pascal, etc.). - OPEN FORUM FOR MEMBERS contains short, informal correspondence among i- ~. members which is of interest to the readership of Pascal IMPLEMENTAl"lONWOTES 7:'reports news of Pasc-al implementations: contacts for maintainers, implementors, distributors, anddocumentors of various implementations as well as where to send bug reports. Qualitative and quantitative.. desctip.t..ions and comparisons of various implementations are publicized. Sections contain information about Portable Pascals, Pascal Variants, Feature-Implementation Notes, and Machine-Dependent Implementations . - - - - - - ALL-PURPOSE COUPON - - - - - - (1-Apr-81) Pascal Users Group P.O. Box 4406 Allentown, Pa. 18170-4406 USA **Note** We will not accept purchace orders. Make checks payable to: "Pascal Users Group", drawn on a U.S. bank in U.S. dollars. See the Policy section on the reverse side alternate address if you are located in the Australasian Region. Note the discounts below, for multi-year subscription and renewal. The U. S. Postal Service does not forward Pascal News. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - USA Europe Aust. ] 1 year $10. $14. A$ 8. ] Enter me as a new member for: ] 2 years $18. $25. A$ 15. [ ] Renew my subscription for: 3 years $25. *35. A$ 20. [ ] Send Back Issue(s) ] My new address/phone is listed below [] Enclosed please find a contribution, idea, article or opinion which is submitted for publication in the Pascal News. [] Comments: ENCLOSED PLEASE FIND: A$ $ CHECK no. NAME ADDRESS PHONE COMPUTER DATE ---------------- ---- ----- -------------- JOINING PASCAL USERS GROUP? Membership is open to anyone: particularly the pascal user, teacher, maintainer, implementor, distributor, or just plain fan. Please enclose the proper prepayment (check payable to "Pascal user's Group"); we will not bill you. Please do not senO-Us purchase ordersi we cannot endure the paper work! When you join PUG any time within a year: January 1 to December 31, you will receive all issues of Pascal News for that year. We produce pascal News as a---means toward the end of promoting Pascal and or communicating news events surrounding pascal to persons interested in Pascal. We are simply interested in the news ourselves and prefer to share it through pascal News. We desi re to minimi ze paperwo rk, because we have other work to do. ------------------------------------------------------------------------------ American Reg ion (North and South Amer ica) , and European Reg ion (Europe, North Africa, Western and Central Asia): Join through PUGUSA - Australasian Region (Australia, East Asia incl. Japan): PUG(AUS). Send $A10.00 per year to: Pascal Users Group, c/o Arthur Sale, Department of Information Science, University of Tasmania, Box 252C GPO, Hobart, Tasmania 7001, Australia. International telephone: 61-02-23 0561 x435 ------------------------------------------------------------------------------ PUG(USA) produces Pascal News and keeps all mailing addresses on a common list. Regional representatlves collect memberships from their regions as a service, and they reprint and distribute Pascal News using a proof copy and . mailing labels sent from PUG(USA) Persons in the Australasian Region must join through thei r reg ional representative. people in other places please . join through PUG(USA) RENEWING? Please renew early (before November and please write us a line or two to tell us what you are doing with pascal, and tell us what you think of PUG and Pascal News. Renewing for more than one year saves us time. ORDERING BACK ISSUES OR EXTRA ISSUES? Our unusual policy of automatically sending all issues of Pascal News to anyone who joins wi thin a year means that we eliminate many requests for backissues ahead of time, and we don't have to reprint important information in every issue--especially about Pascal implementations! - Issues 1 .. 8 (January, 1974 May 1977) are out of print. - Issues 9 .. 12 (September, 1977 June, 1978)-are-available from PUG(USA) all for $15.00 and from PUG(AUS) all for $A15.00 Issues 13 16 are available from PUG(AUS) all for $A15.00i and from PUG(USA) all for $15.00. - Extra single copies of new issues (current academic year) are: $5.00 each . PUG(USA)i and $A5.00 each - PUG (AUS) SENDING MATERIAL FOR PUBLICATION? Your experiences with Pascal (teaching and otherwise), ideas, letters, opinions, notices, news, articles, conference announcements, reports, implementation information, applications, etc. are welcome. Please send material single-spacedand in camera-ready (use a dark ribbon and lines l' i cm. wide) form. All letters will"be printed unless they contain a request to the contrary. APPLICATION FOR LICENSE TO USE VALIDATION SUITE FOR PASCAL Name and address of requestor: (Company name if requestor is a company) Phone Number: Name and address to which information should be addressed (Write IIas above" if the same) Signature of requestor: Date: In making this application, which should be signed by a responsible person in the case of a company, the requestor agrees that: a) The Validation Suite is recognized as being the copyrighted, proprietary prop- erty of R. A. Freak and A.H.J. Sale, and b) The requestor will not distribute or otherwise make available machine-readable copies of the Validation Suite, modified or unmodified, to any third party without written permission of the copyright holders. In return, the copyright holders grant full permission to use the programs and doc- umentation contained in the Validation Suite for the purpose of compiler validation, acceptance tests, benchmarking, preparation of comparative reports, and similar pur- poses, and to make available the listings of the results of compilation and execution of the programs to third parties in the course of the above activities. In such doc- uments, reference shall be made to the original copyright notice and its source. Distribution charge: $50.00 X X Make checks payable to ANPAjRI in US dollars drawn on a US bank. Remittance must accompany application. Mail request to: Source Code Delivery Medium Specification: ANPAjRI . . 9-track, 800 bpi, NRZI, Odd Parity, 600. Magnetic Tape P.O. Box 598 Easton, Pa. 18042 ( ) ANSI-Standard USA Attn: R.J. Cichelli a) Select character code set: ( ) ASCII ( ) EBCDIC b) Each logical record is an 80 character card image. Select block size in logical records per block. ( ) 40 ( ) 20 ( ) 10 ( ) Special DEC System Alternates: ( ) RSX-IAS PIP Format ( ) DOS-RSTS FLX Format lce use on y Signed Date Richard J. Cichelli On behalf of A.H.J. Sale &R.A. Freak Index PASCAL NEWS t21 APRIL, 1981 INDEX o POLICY, COUPONS, I~DEX, ETC. 1 EDITOR'S CONTRIBUTION 3 HERE AND THERE WITH Pascal 3 Book review: "The Pascal Handbook" 4 Book review: "Introduction to pascal" 5 Tidbits 5 PUG PRESS ... our sister publication? 6 I'm not sure?? 7 APPLICATIONS 7 The EMI compiler -- Andrew s. Tanenbaum. 23 Unreal Arithmetic -- Jeff Pepper. 27 ARTICLES 27 "An extention to pascal Read and Write Procedures" -- by David Rowland. 28 "PDP-ll Pascal: The Swedish Compiler vs. OMSI Pascal-I" -- by Margret Kulos 40 OPEN FORUM FOR MEMBERS 43 PASCAL STANDARDS 85 ONE PURPOSE COUPON, POLICY ---------------------------------------------------------------------------- Contributors to this issue (t21) were: EDITOR Rick Shaw Here & There John Eisenberg Books & Articles Rich Stevens Applications . Rich Cichelli, Andy Mickel Standards Jim Miner, Tony Addyman Implementation Notes Bob Dietrich, Greg Marshall Administration Moe Ford, Jennie Sinclair PASCAL NEWS APRIL, 1980 Page 1 Editor's Contribution NEW ADDRESS Yes, in my continued effort to bring you better service, (read this as: I can not do all the work effectively!) I have found someone else (read: sucker) to take over the PUG mailing list. I am sure that this will increase the satisfaction level for this task l~~'. this will take a great load off of my back and allow me to devote all of my time to editing and publishing pascal News. LATE I thought April first (April Fools Day) was an appropriate target date for this issue of Pascal News! I apologize for the tardiness, but my work (I have a real job that pays the bills) and the many pressing problems and issues of PN got in the way. I had to solve the PUG Europe problem, and try to gather as much as I could concerning the final vote on the ISO standard. --- FUTURE OF PUG IN EUROPE It took me more than a few months to correct the festering problems in Europe surround ing pascal News. The prev ious coordinator was sinking under the mire of ever increasing job responsibilities as well as the editorship of clearly the best journal dealing with practical software implementation. (SP&E) As a resul t, the european region suffered from lack of attention. This is over! PUG cares. Please send your "job well done's" to David in Southampton, and send your complaints to PUGUSA. We will be handling all but the Australasia Region from the US. Please read the new APC carefully for policy and price changes. We will be mailing by surface mail to the UK and Europe, but I have been assured by the USPS that it should take no more than a month. I have been asked if I would mail by air for an extra surcharge. The answer has to be no, at this time. PUG can just not afford the special processing and handling that this would be required for two different types of mail. Sorry! STANDARDS Another delay was the standards effort. There is so much going on in the standards arena that we just could not afford to miss it. I think it was worth it. Over half of this issue is devoted to the vote on the ISO standard for Pascal (7185). Jim Miner has done another fine job. -------- PASCAL NEWS APRIL, 198121 Page 2 THIS ISSUE Now the good news! We have another jam packed issue. I think you will recognize out book reviewer this issue. He is an "occasional" contributor to PN. And I hope you will get a chuckle from our "sister" publication PUG PRESS. Andy Mickel brings this little gem to us. The other HERE and THERE article is a real puzzle. It came . to me just as you see it!? The application for this issue was so good I could not miss pubIishing it. It is a Pascal to EMI pseudo code compiler by Andrew Tanenbaum. Its a real beauty. But it was sooooo big I could not publish it all... yet. This issue conta~ns the definition of the assembler language that is output and also an interpreter which serves as the EMI machine definition. Issue 22 will contain the program text for the EMI Pascal compiler. I hope everyone reviews the documentation and the code, even if they do not need the compiler. It is a fine example of elegant design and implementation using the language Pascal. Also included in the APPLICATIONS section is an article by Jeff Pepper om the implementation of extended precision integer arithmetic. A fine job. The ARTICLES section contains a thought provoking extension to the read/write subroutines by David Rowland. Lets hear a response from the members. And finally Maragret Kulos has contributed a very comprehensive article comparing OMSI-l Pascal and The Swedish Pascal compiler. There is a great deal of interest in these two compilers for the PDP-Il. I hope this provides some answers. All in all, a great issue. More to come on EMI in issue #22. Hope you like it! ************************** Here and There With Pascal (5) BOOK REVIEW The failure of many of these implementations to enforce the requirements of the for-statement is not mentioned; indeed for four ThePascaLHandbookby Jacques Tiberghien implementations the entry is None known for implementation-dependent 500pp, 270 Illustrations, SYBEX, Berkeley features. (6) (1980) $US14.95 (paper edition only), The po~s~bility of,the statement failing to terminate (incorrectly) for ISBN 0-89588-053-9. some l1m1t values 1n the OMSI and UCSD implementations is not documented. (7)The statement is ~adethatTheA andB parametersmay not be modified Overview by the statement ~n the Loop. This is simply incorrect, though it is true to say that the loop limits are determined on entry to the loop. This isnot a Pascaltextbook;it is somethingverydifferent. Perhapsthe most succintdescriptionis thatit is a Pascallericon:a sortof Perhaps this is the worst case to show, but a few more examples will suffice all-purposereferencemanual. It is organizedaroundentrieskeyedby an to.showthattheproblemisnot isolated. The syntaxforMARK sho~sthat appropriatePascalword (egif,scope,writeln)arrangedinalphabetical th1S non-standard procedure takes a parameter which is an integer order. Eachentrytakesup one ormorewholepages,and thestandardsub- e~p:ession. MAXINT is incorrectly described as determining the positive headingsare SYNTAX,DESCRIPTION,IMPLEMENTATION-DEPENDENTFEATURESand l1m1t of representable integers (which it may be only coincidentally). The EXAMPLE. The relevanceof theentryto StandardPascaland a numberof syntaxfor CASE statementsis incorrect. And so on. particularimplementations(HPlOOO,CDC,OMSI-l,Pascal/ZandUCSDPascal)is encodedintothe entry. General issues Thus the book is meant to be used as a dictionary to look up difficult points or to find out what some usage in a program you have received really means. Therearetwo.majordeficienciesin thisbookwhichdeservecomment. First As such, it follows a lot of reference manuals which are similarly structured is t~e lack0: f~rmaldefinitions,and indeedtheappearanceof onlya few (eg the B6700/7700 Pascal Reference Manual). Engl~shdescr~pt10nsthatresembletheactualrequirementsof Pascal. The authorclaimsto be talkingaboutPascal(presumablythestandardvariety)as However, since Pascal is a small language with not very many things needing wellas the others,but thereis simplyno basis forcomparisonif thereader to be remembered, it needs to be asked why a lexicon of 500 pages is needed? cannotfindoutwhat sets,for example,arereallysupposedto be. Examination of the book ~ndicates that its main purpose seems to be to document extensions and differences between implementations. Thus, since its The secondis themystifyingomissionof anyreferenceto the Pascal topic is the union of all the quirks of 5 implementations, it has grown to Valid~tioneff~rt. If oneof thepurposesof thebookis to aidprogrammers this rather large size. who w1shto wr1teportablePascalprograms,then it isdifficultto understandwhy the authordid not carryoutvalidationtestson the five compilershe regardsas important,andprinttheresultsin a secondsection Targetandreality of thebook. It wouldhaveadded significantlyto thevalue of thebookas a reference. So much for the target; how does the book match up to it in reality? The answerseemsto be thatitdoesa reasonablygood jobof documentingwhat exists, but that it does not measure up to the very exacting standards that Minor issues such an ambitious project warrants. The standard of accuracy against which a dictionary is judged is much higher than that appropriate for textbooks, in Regrettably,onceagain it isnecessaryto pointout thatcapitalswere which a few lapses can be tolerated or justified on tQe grounds that pedantic designed for carving into stone, not for ease of reading. This book accuracy would impede learning. perpetuates the habit of printing programs in capitals, with consequent loss of legibility. The slips in the book are far too numerous to detail (a list is being sent to the author), and a few examples will have to suffice. Dipping into the entry It,isdi:ficultto de~ucetheauthor'scriteriafor choosingwhich topicsto for the reserved word for is probably the richest source of examples. om1tor 1nclude. To 1llustratethis,notethat theUNITfeatureof USCD Faults which should be-rnentioned are: Pascal,togetherwiththe correspondingUSES, INTERFACEand IMPLEMENTATION res:rvedwords,is not treatedin thebook,apartfroma mention,despite (1) An "equivalent flow-chart" is given. The sense of defining a high- the:rundoubt:dimportanceinuse. On theotherhand,suchtriviaas a pre- level construct such as while in flow-chart terms is questionable at def1nedfunct10nEXPIOin OMSIPascaltakesup 2pages. thebest of times,but for-thecomplexfor-statementit is extremely unfortunate in that it might make people think the flow-chart is right. Directinganothercommentto thepublisherratherthanthe author,one It isn't. won~erswhy thetremendousamountof whitespacein thebookwas tolerated. (2) The prohibition on changing the value of the count variable is not A ~1t~lecarein layout(perhapstwo entriesper page;perhapsdenser mentioned. pr~nt1ng)wouldhavehalvedthenumberof pages,andperhapsreducedthe (3) The limitations on what a count variable can be (only a local simple prIce. variable) are not mentioned. (4) The correct restriction of the HP-lOOO implementation is considered to be an implementation-dependent feature, whereas the corresponding flaw in the J&W/CDC implementation is not mentioned. The presenta:ionls traditional, and there are no surprises. The chapter Summary view headlng~ are. Ba.__~Concept,s, Programming in Pascal, Scalar Types and Operatol s, Exprcs.:non.3 and ~)taLementst Input. and Output Control Structures Despite the criticisms made above-t I believe the book would be usefulto Procenur~s andFunctions, DataTypes, Arrays,Records a~d Variants, Files, programmers who have to cope with Pascal programs which were developed on Sets, POInters and Lists, UCSD cwd Other Pascals, Program Development (15 in' different systems or in different dialects. The level of detail and accuracy all)followedby 12 Appencicesincludinganswersto selectedexercises. of information is not as high as it could bet but nevertheless the book has no competitors. ~..£rtcomings I doubt that it will be of much use to programmers learningPascaltstill less beginners at programming, because it is too difficult to see what is In my opinion,thebook isnot likelyto be widelyused as a text in reallyPascaland what is "extension". And of course,dictionariesare tertiarycourses,for severalreasons. Most importantly,it is very light on simply not meant to be read through. thecon~eptsof Pascal andDrZakstreats ofthelanguagesimply as t1!1other Fortran--orBASIC. In~tructor3 trying togetacrosstheimportant advancesin knowledgeaboJ~computingwillnotforgivethe lack, whereasreadersu~ingit A.H.J.SaZe as a self-tutorialalmostcertainly wouldn't notice the deficiency. Less important, but stillrelevant,is the typicalAmericanverbosityin this kindof book. To illustratetheconceptu31treatment,observethat6 pages (pp135-140)deal withenumeratedtypesand subranges,and 11pages (pp247-257)for sets. Otherdata structuringmethodsseemto farebetter,but thisappearance disappearsonclose ~x3~ination. Forexamplethe array chapter contains 39 pagez, but 4 page3 are devot3d to a matrix addition program, 16 puges to INTRODUCTIONTO PASCAL a sorting program,and8 pages to UCSD features (including UCSD st~ings which arenot arraysat all!),leaving11pagesof discussionof the syntaxand - includingUCSDPascal semanticsof arrays. The low-levelobsessionwith flowof controlis very obviousin thisbook. by RodnayZaks 320pp, 100illustrations A reviewercannotpretendto checkeveryprogramand statementin a book SUCh Sybex,Berkeley(1980)US$12.95(PaperEditiononly) as thi3,but Iwas pleasedto note fewerrorSor half-truthsin "Introduction ISBN0-89588-050-4 to Pascal n. Notable amongst the omissions, however, are references to the axiomatic definitionof Pascal (surely one of the most important sources!) Reviewed by A.H.J.Salc, Sandy Bay, Tasmania. and to thedraft ISOStandzrdfor Pascal. Theseomissionsseemto be related to thebook'sorientationtowar'dssmallcomputersand relativelynaive programmers. I<-.-D' -Ov-erview 00 In spiteof thegreatcare put intothisbook (itstechnicalpresentationis I--' On receivingHbook whichproclaimsthat it will teachyou a programming excellentexceptfortheblu~derof printingprogramtextin capitals),I had langu~ge,Iconceivethat most reviewerswill groanandwonderwhat new there tocometotheconclusionthattheinclusionofUCSD Pascalinitisa is to say. Themore so iftho languageis a popularone,such as BASIC, mistake. The book is predominantly about flSt;::mdardpascaltl, and purchasers Fortran,COBOL, orPa3cal.Formanyeducationablookwriters are whohopetolearnsomethingaboutUCSD PascalthatisnotintheUCSDand plagiarists,and afterthe fifthto tenthversionof the same ideas,my eyes SofTechmanualswillbe disappointed. It seemsthatthe UCSDmaterialacts get wearyand the textfuzzy... as textualclutter,even if its inclusionon thecover sellsmore copies. To startwith,then,it is a pleasureto be able to writethat RodnayZaks book is somewhat different from the run-of-the-mill Pascal books. Firstlyit SU~l1ary has adefjnitecargetreadership,and is addressed to them. DrZaks' book is well-sui t.ed to frticrocoffi}Jut...erenthusiasts and programmers who want to learn a "Introduction to Pascal" by Dr Rodnay Zaks is a useful soft-cover book that bit about Pascal but have no im!IJediate intention ofusing it professionally. will pr'obably be useful to people trying to learn Pascal by themselves, due The expositionis gentle,r~irlyeasyto read,and liberallyinterlacedwith to the many examples. However, it will lead them up to the point of programming usin,__ ?a5c~I, but thinking in traditional ways. Many of the reading exz!:1ple~. insights and prod"ctivity improvements will require extensive further Toenhanceitsvalu~ to such readers, Dr Zaks has decided to include material experience, but perhaps that is inevitable. on one popular var'iant ofPascal in the microcomputer field: UCSDPascal. Thisisinterspersetdhroughoutthe book in clearly labelled sub-sections. Secondly, the book has 8 good collection of examples, and they are not eX8ctl_y the sa:J!(~examples you find .in other textbooks!' Learning a language is always \)asier if you C~ln read. it (and read a lot of it), since then you discover sampl"r's (or templates) that you can modify to your own purposes, and thus gr'Mually discover typical.programming paradigms of that language.
Description: