From: tfrancis@wpi.wpi.edu (Krishan M Nainani)
Subject: From C to Ada
Date: 4 Jul 89 19:03:54 GMT [thread overview]
Message-ID: <3100@wpi.wpi.edu> (raw)
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
------------------------------------------------------------
reply other threads:[~1989-07-04 19:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox