Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!ucla-cs!ucla-seas!JAMES@wiffin.chem.ucla.edu From: james@abby.chem.ucla.edu (James Wilkinson) Newsgroups: comp.lang.pascal Subject: Re: Need to call a large C procedure from Pascal..... Message-ID: <00932E03.239F79E0@wiffin.chem.ucla.edu> Date: 26 Feb 90 14:27:39 GMT References: <4673@jarthur.Claremont.EDU> Sender: news@SEAS.UCLA.EDU Reply-To: james@abby.chem.ucla.edu (James Wilkinson) Organization: Department of Chemistry, UCLA Lines: 19 > I need a bit of help. I have a main program written in Pascal, and > I have a large (20,000 line) C procedure that I would like to call > from the main program, instead of re-writing a similar procedure in > Pascal. This should be easy to do on the VAX. Compile the C program as a module (ie., no main section), define the appropriate external routines in the pascal program, call them, and you are happy. You didn't say whether or not you want to call the C code as a whole (which would mean you would need to make the C code callable as a whole), so I'm assuming you only want to call subroutines from the C code. I know there are people at HMC that do this all the time. JaW James Wilkinson Phone: 1-213-206-5104 Department of Chemistry and Biochemistry FAX: 1-213-206-5381 University of California, Los Angeles BITNET: JAMES@UCLACH 405 Hilgard Avenue Internet: JAMES@ABBY.CHEM.UCLA.EDU Los Angeles, California 90024-1569 SPAN: ABBY::JAMES or 5882::JAMES