English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I am just learning programming, plz tolerate me a bit. Thanks.

2007-04-28 15:57:30 · 4 answers · asked by jabba 1 in Computers & Internet Programming & Design

4 answers

Syntax error means the program is not written to follow the rules of the language (e.g., "x = 3 + + + 5" instead of "x = 3 + 5").

Semantic errors are when the program contains a logic error -- it follows the rules of the language, but does not do what the programmer intended it to do (e.g., "x = 3" when you really wanted "x = 5").

Runtime errors are errors during execution that often result from conditions outside of the programmer's control (for example, user input, availability of external resources, etc.). Good coding will anticipate common runtime errors and handle them appropriately.

2007-04-28 16:04:39 · answer #1 · answered by McFate 7 · 1 0

A syntax error is a spelling or structure mistake, where the programmer writes a misspelled keyword or makes a mistake in the structure of the program. For example, leaving out a semicolon at the end of a statement if the programming languages requires it. Another example would be forgetting to close a quote mark.

The semantic error is an error regarding the meaning of the statement. For example, assigning a string to a numeric variable.

A runtime error is an error which causes the program to crash during runtime. Examples of these errors include overflow, division by 0. These happen when there is lack of memory or unusual data.

2007-04-28 20:47:13 · answer #2 · answered by Smutty 6 · 0 0

In computer science, runtime or run time describes the operation of a computer program, the duration of its execution, from beginning to termination (compare compile time). The term is also used as a short form when referring to a runtime library (without a space), a program or library of basic code that is used by a particular computer language to manage a program written in that language while it is running.


In computer science, considered in part as an application of mathematical logic, semantics reflects the meaning of programs or functions.
The Semantic Web refers to the extension of the World Wide Web though the embedding of additional semantic metadata.


The syntax of a programming language is the set of rules that a sequence of characters in a source code file must follow to be considered a conforming program in that language.

The rules specify how the character sequences are to be chunked into tokens (the lexical grammar), the permissible sequences of these tokens and some of the meaning to be attributed to these permissible token sequences (additional meaning is assigned by the semantics of the language).

The syntactic analysis of source code usually entails the transformation of the linear sequence of tokens into a hierarchical syntax tree (abstract syntax trees are one convenient form of syntax tree). This process is called parsing, as it is in syntactic analysis in linguistics. Tools have been written that automatically generate parsers from a specification of a language grammar written in Backus-Naur form, e.g., Yacc (yet another compiler compiler).

2007-04-28 16:03:47 · answer #3 · answered by Anonymous · 0 0

see this...

2007-04-28 16:06:09 · answer #4 · answered by nusdunda 3 · 0 0

fedest.com, questions and answers