near union { unsigned int Flag16_1; struct { unsigned int ScanInput :1; unsigned int sw2 :1; unsigned int r :1; unsigned int r_lock :1; unsigned int sw1_lock :1; unsigned int sw2_lock :1; unsigned int Stop_100ms :1; unsigned int Start_Scan :1; unsigned int Roller_Stat :1; unsigned int :7; }bits; }Flag1bits;
--在其他副程式中仍會存取此變數,宣告如下--
extrn near union { unsigned int Flag16_1; struct { unsigned int ScanInput :1; unsigned int sw2 :1; unsigned int r :1; unsigned int r_lock :1; unsigned int sw1_lock :1; unsigned int sw2_lock :1; unsigned int Stop_100ms :1; unsigned int Start_Scan :1; unsigned int Roller_Stat :1; unsigned int :7; }bits; }Flag1bits;