ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Пятница
26 апреля
554437 Топик полностью
Dingo (20.10.2014 12:18 - 12:23, просмотров: 148) ответил Apтём на Плюсов нет - это минус...
Спасибо за помощь, но похоже проблема не решаема. Надо иметь возможность сделать объявление переменной в цикле: for( uint8_t i=1; i; i=0){ // some code here } А космик не умеет. for( unsigned char tmp=12 ; tmp; setInterruptState(tmp) == 0 ) { tmp = getByte(); } Пишет:
myfile.c:12:38: warning: truncating assignment myfile.c:12:6: tmp undefined
Если интересно - ниже список совместимостей с С99. Вроде нет там такого.
Description of Supported C99 Extensions This appendix describes the features supported by the compiler as C99 extensions when compiling with -pc99compiler option. Some C99 extensions are supported unconditionally like the //comment, the _Bool and the long longtypes whenever implemented. Trailing comma in enumeration declaration The last member of an enumeration list may be followed by a trailing comma before the closing brace.The comma will be ignored. Flexible array The last field of a structure may be an array declared without any explicit dimension. Repeated qualifiers The constand volatilequalifiers may be repeated in the same declaration either directly or indirectlythrough a typedef declaration. Inline keyword The compiler recognizes the inlinekeyword as a function storage class requesting the function to be inlined. It behaves like the @inlinemodifier. Variable macro arguments The last parameter of a macro definition may be the ...punctuator allowing a macro to have a variable number of arguments. The predefined __VA_ARGS__symbol is replaced by the full list of extra arguments matching the ...parameter.