Unix Pascal as a system programming language?

HEDRICK at RUTGERS.ARPA HEDRICK at RUTGERS.ARPA
Wed Jun 13 14:52:41 AEST 1984


From:  Charles Hedrick <HEDRICK at RUTGERS.ARPA>

We are moving one of our system programming courses from a DEC-20 to
Unix.  I had originally intended that the course would use C.
Unfortunately, the faculty member is not willing to change languages.
Thus it will happen in Pascal.  (Don't flame at me - I know this is a
horrible idea, but can't do anything about it.)  On the DEC-20, I am
accustomed to being able to do any  operating system call from Pascal.
Does anyone have experience with doing system calls (and calls to
curses) from Berkeley Pascal?  It seems to be possible in principle. But
the Pascal documentation isn't a great deal of help.  On our SUN (which
uses 4.2bsd), I just created a program that called gethostname. If I
don't declare gethostname, the compiler complains that it has never
heard of gethostname.  If I do declare it external, the compiler
complains that I am redeclaring a procedure that is in /lib/libc.a.
However the latter complaint is just a warning, and the program works
correctly.
  1) Is there some better way of doing this?
  2) Does somebody have .h files for Pascal that declare all the 
	system calls, and the data structures that they use?
  3) ditto for curses
-------



More information about the Comp.unix mailing list