I have been reading about PHP and many authors mention semantic and logical errors separately. As an example of a semantic error, they give a function called with incorrect number of parameters: this will not be caught by the parser, but will throw an error when run.Yet in languages such as C++, this will be caught by the compiler. I would say that it's a syntax error then. What is the difference then between a semantic and a logical error?For example, in How to think like a computer scientist, the author uses logic error and semantic error interchangeably. On the other hand, in the Visual Basic .NET. Primer Plus, logic error is separated from semantic error.
Can all languages have semantic and logical errors?
terminology;programming languages;compilers;program correctness