I basically want to call the following struct in .c from fortran as follows
...
struct AZNames{
int Number;
char *Name;
char *Unit;
int Typ;
};
static struct AZName AZLNames[] = {
{1, "Interaction G(%d)" , "Sa", 1}
{2, "Object H(%d)" , "Da", 3}
{3, "Action G(%d)" , "Fa", 2}
}
... what I really want to achieve is a state in fortran in which if I give in a randomlly selected number i.e 1, 2 or 3 ..., I recieve the corresponding Name, unit and Typ as stated in the struct.
... I have tried out a couple of methods calling this struct from fortran but still pretty much not close to my aim.
...
struct AZNames{
int Number;
char *Name;
char *Unit;
int Typ;
};
static struct AZName AZLNames[] = {
{1, "Interaction G(%d)" , "Sa", 1}
{2, "Object H(%d)" , "Da", 3}
{3, "Action G(%d)" , "Fa", 2}
}
... what I really want to achieve is a state in fortran in which if I give in a randomlly selected number i.e 1, 2 or 3 ..., I recieve the corresponding Name, unit and Typ as stated in the struct.
... I have tried out a couple of methods calling this struct from fortran but still pretty much not close to my aim.