answersLogoWhite

0

An error in the logic of a program means that the output of the program is faulty (eg the program tell you 2+2=5). An error in semantics in a program means that the program statements are not constructed properly and the usual result of this is that the program will not compile.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What is a semantic error in vb and give examples?

An example of semantic error is: a+b = c.


Difference between ladder logic and relay logic?

nmbjbjkjlkkljjgffhk;kh


Difference between semantic error and logical errors?

Syntax Error: error due to missing colon, semicolon, parenthesis, etc. Syntax is the way in which we construct sentences by following principles and rules. Example: In C++, it would be a syntax error to say int x = "five"; This will not compile because it does not follow the syntax of the language and does not make any sense to the compiler. Semantic Error: it is a logical error. it is due to wrong logical statements. Semantics is the interpretations of and meanings derived from the sentence transmission and understanding of the message. Semantics errors are Logical, while Syntax errors are code errors. Example: A semantic error would compile, but be incorrect logically: const int pi = 12345; Your program will likely compile and run without error but your results will be incorrect. (Note that these types of errors are usually much harder to debug)


1 What are the differences between propositional and first order logic?

Difference between Propositonal and Predicate logic


What are Mistakes that cause a running program to produce incorrect results?

You could call it a bug in general but more specifically code with no syntax errors (i.e. it compiles and runs) but doesn't produce the output you expect would be called a semantic error.


What is the difference between a compilation error and logic error?

errors which come during compilation is known as compilation error. here we get syntax errors only not logical errors like division by zero. logical error occur during run time example:if you write a program for division with zero you will not get compilation error but during execution you will error


What is Semantic errors in c?

A semantic error is a logic error. That is, the code may compile and run, but does not perform as you intended. Some semantic errors can be picked up by the compiler, often shown as warning, such as: if (x = 5) // warning: did you mean x == 5? Others are simply impossible for the compiler to spot: int x, y, z; // ... ++z; // add 1 to x In the above code, we meant to increment x, but incremented z instead. The compiler won't notice the error so this will inevitably lead to a runtime error.


What is the difference between traditional logic and modern symbolic logic?

Check out the related links section for the history of symbolic logic. And traditional logic


What is the difference between a PLD and mixed logic gates?

Answering "What is differences between pld and mixed logic gatessuch as the 7400 7432 ic logic device name one pld device?"


Discrimination between semantic and syntax errors?

A syntax error is a statement that does not conform to the language grammar. Often caused by simple typos, you might have misspelt a name or missed out a semi-colon or something that renders the statement completely meaningless to the compiler. These are usually picked up by the compiler. A semantic error is a logic error; the code compiles but does not perform as expected. A common semantic error is to mix up the assign (=) and equality (==) operators which introduced side-effects. In some cases the compiler may alert you with a warning, but otherwise the only way to detect these errors is with a comprehensive runtime test that exercises all aspects of your program. It also helps to make liberal use of debug assertions to assert that what you think to be true really is true. Debug assertions help reduce code-bloat as they eliminate the need for unnecessary error-checking in release code. But beware of semantic side-effects here also: assert(x=42); // Side-effect by assignment! Use x==42 instead.


What is a difference between Programming language and peoplecode?

Logic is same, but syntax is different.


What is difference between logic and thought?

Logic comes out from thought so both are related directly. If you shall think about something and then you come out on some results that becomes logic.