| Statement (programming) |
Article Index for Statement |
Website Links For Statement |
Information AboutStatement (programming) |
|
Many languages (eg, C ) make a distiction between statements and definitions, with a statement only containing executable code and a definition declaring an identifier. The following are the major generic kinds of statements with examples in typical imperative languages:
In most languages statements contrast with Expression s in that the former do not return results and are executed solely for their Side Effect s, while the latter always return a result and often do not have side effects at all. Among imperative programming languages, Algol 68 is one of the few in which a statement can return a result. In languages which mix imperative and Functional styles, such as the Lisp family, the distinction between expressions and statements is not made: even expressions executed in sequential contexts solely for their side effects and whose return values are not used are considered 'expressions'. The syntax and semantics of statements is usually specified in the definition of the Programming Language and cannot be changed in a program. Only few programming languages allow user defined statements or overloading of statements. Typical programming languages with statements are Ada , ALGOL , BASIC , C , C++ , COBOL , Eiffel , Fortran , Java , JavaScript , Modula , Oberon , Pascal , Perl , PL/I , Python , REXX , Ruby , Seed7 , Simula and Tcl . SEE ALSO
|
|
|