Path: utzoo!attcan!uunet!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!news.cs.indiana.edu!ux1.cso.uiuc.edu!uxa.cso.uiuc.edu!jb10320 From: jb10320@uxa.cso.uiuc.edu (Desdinova) Newsgroups: comp.sys.apple2 Subject: Re: external function calls in Pascal Message-ID: <1990Nov6.170945.10609@ux1.cso.uiuc.edu> Date: 6 Nov 90 17:09:45 GMT References: <1620@kluge.fiu.edu> Sender: news@ux1.cso.uiuc.edu (News) Organization: University of Illinois at Urbana Lines: 31 In article <1620@kluge.fiu.edu> acmfiu@serss0.fiu.edu (ACMFIU) writes: >I would like to combine some Pascal functions and procedures with an >Orca/C program. The variables would be declared in the Pascal routines >but I would like to access them from C. Would I do this with a "unit"? > >albert Hi, it's me again. Umm... first thing's first. You need to define prototypes for the functions you want to call similar to this: pascal int function(int a,float b,char *c); Note the 'pascal' qualifier. Also, you may or may not have to define the Pascal routines in question inside a unit. If the routines are Pascal library routines, then no unit is required (Link will search the paslib). BTW, what version of C do you have? I use file operations all the time and have no problems. You said you open a file, and it goes to the end. Exactly what statements are you using to open the file (send me source code). Also- why didn't you leave the program in pascal? Also- did you say you have a pascal->C conversion program, or just a method? -- Jawaid Bazyar | Blondes in big black cars look better wearing Senior/Computer Engineering | their dark sunglasses at night. (unk. wierdo) jb10320@uxa.cso.uiuc.edu | The gin, the gin, glows in the Dark! Apple II Forever! | (B O'Cult) Comp.Sys.Apple2- Home of the Unofficial Apple II Developer Support Team (DST)