I ran into this in ngspice code ...

A structure ....

typedef struct SPICEdev {
    int (*DEVparam)(int,IFvalue*,GENinstance*,IFvalue *);  
    int (*DEVmodParam)(int,IFvalue*,GENmodel*);   
    int (*DEVload)(GENmodel*,CKTcircuit*);   
    int (*DEVsetup)(SMPmatrix*,GENmodel*,CKTcircuit*,int*);   
} SPICEdev; 

is initialized like this ....

SPICEdev CCCSinfo = {
    DEVparam      : CCCSparam,
    DEVmodParam   : NULL,
    DEVload       : CCCSload,
    DEVsetup      : CCCSsetup
};

I would expect this (as it is in Spice 3f5) ....

SPICEdev CCCSinfo = {
    CCCSparam,
    NULL,
    CCCSload,
    CCCSsetup
};


The way it is done in ngspice is certainly an improvement, but I 
could not find any documentation for that syntax.  It obviously 
works, at least with gcc.  Is this a gcc extension?  Can 
someone point me to some official documentation?

I am not looking for an explanation of how this feature works 
and why to use it.  It is obvious to me.  I am looking for a 
reference to official documentation. It is a good feature, that 
I would like to use, but I will only use it if it is part of 
the official language.


_______________________________________________
geda-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev

Reply via email to