Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
This started in a comment, but got long and detailed enough that it should be an answer. This answer addresses your first point: Compiler error is syntax error No, these are not the same. Synta...
#1: Initial revision
This started in a comment, but got long and detailed enough that it should be an answer. This answer addresses your first point: <blockquote>Compiler error is syntax error</blockquote> No, these are not the same. Syntax errors are errors the compiler catches (I assume that's what you mean by "compiler error".). However, not all errors caught by a compiler are syntax errors. One example is an assignment to a variable where the expression is a symbol. When that symbol is the name of a variable of the correct type, then that's fine. If the symbol is something that doesn't result in an expression or an expression of the wrong type (depending on language), then it's a compile-time error. However, it is still syntactically correct. <blockquote>can you give an example for that example? Maybe a piece of code</blockquote> Consider the Pascal assignment statement: <pre>MyVar := SomeSymbol;</pre> This statement is syntactically correct, since <code>MyVar</code> and <code>SomeSymbol</code> are valid symbol names. If <code>SomeSymbol</code> is the name of a variable that has a compatible type to <code>MyVar</code>, there is no error at all. The same is true if <code>SomeSymbol</code> is the name of a function that returns a value of compatible type. However, it is an error if <code>SomeSymbol</code> is the name of a subroutine, for example.
