From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 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. List-Id: 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 ------------------------------------------------------------