Xref: utzoo comp.lang.pascal:1100 comp.lang.misc:1948 comp.lang.modula2:1087 Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!pasteur!ucbvax!hplabs!pyramid!infmx!greggy From: greggy@infmx.UUCP (greg yachuk) Newsgroups: comp.lang.pascal,comp.lang.misc,comp.lang.modula2 Subject: Re: Is this Pascal? Message-ID: <482@infmx.UUCP> Date: 3 Oct 88 20:37:42 GMT References: <942@naucse.UUCP> Reply-To: greggy@infmx.UUCP (greg yachuk) Organization: Informix, Menlo Park, Ca. U.S.A. Lines: 32 In article <942@naucse.UUCP> rwi@naucse.UUCP (Robert Wier) writes: > strange variant. It may be CPM oriented. Can you tell me 1) is this > Pascal? and 2) What are the syntax rules for matching the END statements > with the conditionals? > > --Thanks -- Bob Wier !arizona\!naucse\!rwi It looks like each control statement can have a statement list and must be explicitly END'ed. Somewhat-more-standard Pascal's usually take allow a single statement (which may be BEGIN stmt-list END). I'd line them up like this: PROCEDURE LongSub (A, B : LONG;VAR Result : LONG); (* Subtract two LONGs (A - B), giving Result *) VAR Borrow : INTEGER; i : CARDINAL; BEGIN Borrow := 0; FOR i := 1 TO DIGITS DO Result[i] := (A[i] - Borrow) - B[i]; IF Result[i] < 0 THEN Result[i] := Result[i] + BASE; Borrow := 1; else Borrow := 0; END; END; END LongSub; Greg Yachuk Informix Software Inc., Menlo Park, CA (415) 322-4100 {uunet,pyramid}!infmx!greggy why yes, I DID choose that login myself