ku86755
Hi,thiagoralves,thanks for your great woks!
 
Can you give me some advice for the following problem?
 
C code doesn't  contains curly braces,compile success 
 
1.png
 
C code  contains curly braces,compiler got a bunch of mistakes
2.png
Reply 0 0
thiagoralves
Pragmas { } are supposed to be used with very simple C code. You can try placing this IF condition outside the pragmas, using Structured Text instead.
 
If that doesn’t work for you, then use the Arduino Extension (if you’re compiling for an Arduino-compatible board). That is much more powerful that just using pragmas with Structured Text
Reply 0 0
Reply