| Electronic Components Datasheet Search |
|
AN3350 Datasheet(PDF) 152 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3350 Datasheet(HTML) 152 Page - STMicroelectronics |
|
152 / 185 page ![]() Pragmas for diagnostic messages AN3350 152/185 Doc ID 018512 Rev 2 precompiled header from machine to machine causes the precompiled header to produce different results. For more information, see pragma once. This pragma does not correspond to any panel setting. By default, this setting is off. 19.29 warn_possunwant Controls the recognition of possible unintentional logical errors. Syntax #pragma warn_possunwant on | off | reset Remarks If you enable this pragma, the compiler checks for common, unintended logical errors: ● An assignment in either a logical expression or the conditional portion of an if, while, or for expression. This warning message is useful if you use = when you mean to use == .Example 100 shows an example. Example 100 Confusing = and == in Comparisons if (a=b) f(); /* WARNING: a=b is an assignment. */ if ((a=b)!=0) f(); /* OK: (a=b)!=0 is a comparison. */ if (a==b) f(); /* OK: (a==b) is a comparison. */ ● An equal comparison in a statement that contains a single expression. This check is useful if you use == when you meant to use =. Example 101 shows an example. Example 101 Confusing = and == Operators in Assignments a == 0; // WARNING: This is a comparison. a = 0; // OK: This is an assignment, no warning ● A semicolon (;) directly after a while, if, or for statement. For example, Example 102 generates a warning message. Example 102 Empty statement i = sockcount(); while (--i); /* WARNING: empty loop. */ matchsock(i); If you intended to create an infinite loop, put white space or a comment between the while statement and the semicolon. The statements in Example 103 suppress the above error or warning messages. Example 103 Intentional empty statements while (i++) ; /* OK: White space separation. */ while (i++) /* OK: Comment separation */ ; By default, this pragma is off. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |