Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!husc6!m2c!wpi!wpi.wpi.edu!tfrancis From: tfrancis@wpi.wpi.edu (Krishan M Nainani) Newsgroups: comp.lang.ada Subject: From C to Ada Message-ID: <3100@wpi.wpi.edu> Date: 4 Jul 89 19:03:54 GMT Sender: tfrancis@wpi.wpi.edu Reply-To: tfrancis@wpi.wpi.edu (Krishan M Nainani) Distribution: usa Organization: Worcester Polytechnic Institute, Worcester, Mass. Lines: 32 Hi, In converting some C code to Ada I came across a difficulty. In C, I pass the address of a structure (any structure) to a routine that doesn't care what the structure is. The structure is defined in this higher-level program which contains the procedure call. For example : struct stype { int a,b,c; float d,e,f; } a_struct; x = func_name(&a_struct); /* BTW, in "func_name" I store the structure contents in bytes by casting (char *). */ In designing the low-level routine (in which this function is encoded), I was wondering if I could pass the address of a structure as I do above in C. If not, then I would have to use a generic package with a private parameter. ****************************************************************** Also, thanks to everyone who sent me replied to my last mail message regarding questions on C -> Ada. ****************************************************************** Krishan Nainani. reply-to: tfrancis@wpi.wpi.edu ------------------------------------------------------------