home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!dtix!mimsy!afterlife!adm!news
- From: daniel@gemme.u-strasbg.fr (STOEFFLER Daniel)
- Newsgroups: comp.sys.sgi
- Subject: Pointing on a Pascal subroutine
- Message-ID: <32194@adm.brl.mil>
- Date: 25 Aug 92 19:30:03 GMT
- Sender: news@adm.brl.mil
- Lines: 51
-
- I have to give a pointer pointing on a Pascal procedure to a C function
- which calls XDR procedure: the XDR procedure needs a pointer pointing
- on my Pascal procedure. How can I do this ?
- In the last version of the Pascal doc it seems possible to use pointers
- on functions and procedures but I was not able to make it working.
- Example:
-
- { the C function declared as external }
- procedure Service(var proc_ptr:pointer); external;
-
- { the program containing the procedure Calcule_dens which I want
- to call in the XDR procedure }
-
- program ...
-
- { declaration of the procedure pointer }
- var proc_ptr:^procedure;
-
- { procedures }
-
- ...
- procedure Calcule_dens;
- ...
- ...
-
- { main }
- { allocation of the pointer }
- proc_ptr:=addr(calcule_dens);
- ...
- { the call of the C function }
- Service(proc_ptr);
- ...
- { end of the program }
-
- At the compilation I obtain:
- Service(proc_ptr);
- ^
- Parameter type does not agree with declaration
-
- What is the problem and how can I solve it ?
- Thank in advance.
- STOEFFLER Daniel daniel@gemme.u-strasbg.fr
- o ___ __ __ ___ ___ ___
- | | \ / \ |\ /| / \ / \ | |\ /| |\ /| |
- | |__/ | | \/ | \__ #### | _ |__ | \/ | | \/ | |__
- | | | | | \ #### | | | | | | | | |
- | | \__/ | | \__/ \___/ |___ | | | | |___
-
- INSTITUT de PHYSIQUE et de CHIMIE DE STRASBOURG 4, rue Blaise Pascal
- GROUPE d'ETUDES des MATERIAUX METALLIQUES 67070 Strasbourg, France
- Structure Electronique et Magnetisme de Structures Artificielles
-