AnsweredAssumed Answered

CW 4.5 for s12x - #if and sizeof

Question asked by DEREX Pascal on Mar 14, 2007
Latest reply on Mar 15, 2007 by DEREX Pascal
hello,
I use CW 4.5 for s12x
I would like to display an message error if the struct is  too much important:
 
typedef struct
{
 //tensions de références vref1 doit tjrs commencer la structure
 SWORD vref1;
 SWORD vref2;
 SWORD vref3;
 //config des switchs
 SWORD swcfg;
 //variable pour tester si l'eeprom a été configurée ou non
 //0=>non configuré 1=>configurée
 SWORD etat; 
}DATA_CONFIG;
_EEPROM_H_ DATA_CONFIG Config;
 
#if (sizeof(DATA_CONFIG)>2000)
#error "error message"
#endif
 
I have the message Undefined Macro 'sizeof'
How could solve this problem?
 
Thank you for help
 
Alban Edit: s'te plait indique le produit dans le sujet.

Message Edited by Alban on 2007-03-14 03:37 PM

Outcomes