loverso@sunybcs.UUCP (the software coggie) (04/14/85)
Could somebody please send me a practical example of using includes with .h files for Berkeley Pascal (we run v3.0 on 4.2BSD). Last time I coded pascal was on a cyber a few years ago - and I havent touched it since I learned C. Specifically, what I am looking to do is have separate compilation. (I'm not worried about portability issues). I have some modules: proto.p and proto.h, system.p and system.h, and the program in verify.p. Both .h files define a bunch of types. proto.h looks like: type some types var some vars procedure xxx(); external; and so on. proto.p looks like: #include "proto.h" some procedures/functions (which are declared external in proto.h) the same goes for system.p. verify.p looks like: program verify(...); #include "proto.h" #include "system.h" begin ... end. when I compile, I get errors in system.h: w 1 - all type declarations should preceed var and routine declarations w 1 - all types should be declared in one type part I'm not sure if the definitions work or not (not all of verify.p is written), but code not related to either module works. I pretty much tried to follow the example given in section 5.10 (p.42&43) of the "Berkeley Pascal Users Manual". Thanks! Any working programs/examples mailed to me would be GREATLY appreciated! -- John Robert LoVerso @ SUNY Buffalo (716-636-3004) ARPA/CSNET: LoVerso%Buffalo@CSNET-RELAY UUCP: ..![bbncca,decvax,dual,rocksanne,watmath]!sunybcs!loverso