Hello, I have the following macro problem in the code below : I want to put out a struct with elements such as in NSAffineTransform from Foundation, I'll give an example with i = 2 and j = 2 : typedef struct { OpalFuzzyNode *m11; OpalFuzzyNode *m21; OpalFuzzyNode *m12; OpalFuzzyNode *m22; } _OpalMatrix;
As you can see I want to write out the struct not parse it or use common "functionality". If you know how to do this, please send some email. Here you see the parsed version : #ifndef OpalFuzzyMatrix_h_defined #define OpalFuzzyMatrix_h_defined #define makeMatrixElement(i,j) \ OpalFuzzyNode * m#i#j; #define makeMatrix(w, h) \ typedef struct { for (i = 0; i < h; i++) \ for (j = 0; j < w; j++) \ makeMatrixElement(i,j) \ } _OpalMatrix; @interface OpalFuzzyMatrix : NSObject { long int _w,_h; _OpalMatrix *_matrix; } - (id) new; - (void)setWidth:(long int)w height:(long int)h; - (BOOL)hasDimensionsBeenSet:(BOOL)b; - (void) calibrateDimensions; @end #endif `Enry
_______________________________________________ Gnustep-dev mailing list Gnustep-dev@gnu.org https://lists.gnu.org/mailman/listinfo/gnustep-dev