🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.pascal
Article #172

help needed w/ .h files in BSD pascal

#172
From: the software coggie
Date: Sun, 14 Apr 1985 11:35
43 lines
2092 bytes
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
Technical Details
Message-ID: <1495@sunybcs.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!sunybcs!loverso

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/5/84; site sunybcs.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!sunybcs!loverso
From: loverso@sunybcs.UUCP (the software coggie)
Newsgroups: net.lang.pascal
Subject: help needed w/ .h files in BSD pascal
Message-ID: <1495@sunybcs.UUCP>
Date: Sun, 14-Apr-85 06:35:26 EST
Article-I.D.: sunybcs.1495
Posted: Sun Apr 14 06:35:26 1985
Date-Received: Wed, 17-Apr-85 00:31:54 EST
Distribution: na
Organization: SUNY/Buffalo Computer Science
Lines: 43