0
What does semantical mean?
2 Antworten
+ 1
The semantics in a programming language is the logic it will have, for example. A semantic error is valid code for the compiler but the result may be the not expected by the programmer, this can be due to having used an incorrect variable, an incorrect operation or an operation in incorrect order, etc. When this happens there's no way for the compiler to detect it because it is syntactically valid code, but semantically (or logically) it does not make sense.
0
You can see a semantic error when the syntax of your code is correct but the code usage isn’t correct. The most common semantic error is when code uses a variable which is not initialized properly.