Language Construct
   HOME

TheInfoList



OR:

In
computer programming Computer programming or coding is the composition of sequences of instructions, called computer program, programs, that computers can follow to perform tasks. It involves designing and implementing algorithms, step-by-step specifications of proc ...
, a language construct is "a syntactically allowable part of a program that may be formed from one or more lexical tokens in accordance with the rules of the
programming language A programming language is a system of notation for writing computer programs. Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
", as defined by in the ISO/IEC 2382 standard (
ISO/IEC JTC 1 ISO/IEC JTC 1, entitled "Information technology", is a joint technical committee (JTC) of the International Organization for Standardization (ISO) and the International Electrotechnical Commission (IEC). Its purpose is to develop, maintain an ...
). A term is defined as a "linguistic construct in a conceptual schema language that refers to an entity". While the terms "language construct" and "control structure" are often used synonymously, there are additional types of logical constructs within a computer program, including variables, expressions, functions, or modules.
Control flow In computer science, control flow (or flow of control) is the order in which individual statements, instructions or function calls of an imperative program are executed or evaluated. The emphasis on explicit control flow distinguishes an '' ...
statements (such as
conditionals Conditional (if then) may refer to: *Causal conditional, if X then Y, where X is a cause of Y *Conditional probability, the probability of an event A given that another event B *Conditional proof, in logic: a proof that asserts a conditional, a ...
,
foreach loop In computer programming, foreach loop (or for-each loop) is a control flow statement for traversing items in a collection. is usually used in place of a standard loop statement. Unlike other loop constructs, however, loops usually mainta ...
s, while loops, etc) are language constructs, not functions. So while (true) is a language construct, while add(10) is a function call.


Examples of language constructs

In PHP print is a language construct. is the same as: Programming constructs In Java a
class Class, Classes, or The Class may refer to: Common uses not otherwise categorized * Class (biology), a taxonomic rank * Class (knowledge representation), a collection of individuals or objects * Class (philosophy), an analytical concept used d ...
is written in this format: public class MyClass In C++ a class is written in this format: class MyCPlusPlusClass ;


References

{{Compu-lang-stub