Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!purdue!bu-cs!beh From: beh@bu-pub.bu.edu (Bruce E. Howells) Newsgroups: comp.lang.pascal Subject: Fragmented Declaration Blocks Legal? Message-ID: <35692@bu-cs.BU.EDU> Date: 2 Aug 89 06:00:03 GMT Sender: daemon@bu-cs.BU.EDU Distribution: comp Organization: Boston University Lines: 34 We're running ANSTO Pascal v3 here, and in an effort to cure some annoying string errors, I've been looking at putting an "add-in" package of routines to create the types, globals, and procedures I'll need. Much to my dismay, I found that the following construct is legal, and works "properly": program ugh(output); type type1= integer; var var1: type1; procedure proc1; begin writeln (' proc1'); end; (* now it gets interesting... *) type type2=alfa; (* alfa is a built-in packed array [1..8] of char *) var var2:type2; procedure proc2; begin writeln (' proc2'); end; begin (* main *) writeln (' nothing'); end. - The above was hand-written, so if it has a syntax error or two, - my apologies... Of course, this is just what I need to stick a bunch of code in there with a single include (switching input to another file until eof) - but is it really correct (or polite)? It seems to go directly against what I know of Pascal, but it's there... Comments? Bruce E Howells, beh@bu-pub.bu.edu / engnbsc@buacca.bitnet Just a lowly engineering undergrad at Boston University...