Inline videos. See also:Category: Articles with embedded Videos..

Statement (programming)

From Biocrawler, the free encyclopedia.

A statement is the minimal unit of structuring in imperative programming languages.

The following are the major generic kinds of statements with examples in Pascal, a typical imperative language:

  • definition: TYPE SALARY = INTEGER
  • declaration: VAR A:INTEGER
  • assignment: A := A + 1
  • sequence: A := A + 1; WRITELN(A)
  • conditional: IF A > 3 THEN WRITELN(A) ELSE WRITELN("NOT YET") END
  • loop: FOR A:=1 TO 10 DO WRITELN(A) END
  • call: CLEARSCREEN()

Statements contrast with expressions in that the former do not return results and are executed solely for their side effects, while the latter always return a result and often do not have side effects at all.

In block-structured programming languages, statements are grouped into statement blocks.vi:Câu lệnh

Wikipedia (http://en.wikipedia.org/wiki/Main_Page) Statement_(programming) (http://en.wikipedia.org/wiki/Statement_(programming)) version history (http://en.wikipedia.org/w/index.php?title=Statement_(programming)&action=history) GNU Free Documentation Lizenz (http://en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License) CC-by-sa (http://creativecommons.org/licenses/by-sa/2.5/)

Personal tools
Google Search
Google
Web
biocrawler.com