Language construct: Difference between revisions

Content deleted Content added
Add text
short description, links
Tags: Mobile edit Mobile app edit iOS app edit
Line 1:
{{Short description|Syntactically valid part of a program formed from lexical tokens}}
{{More sources|date=January 2021}}
 
AIn [[computer programming]], a '''language construct''' is a [[syntaxSyntax (programming languages)|syntactically]] allowable part of a [[Computer program|program]] that may be formed from one or more [[lexical token]]s in accordance with the rules of athe [[programming language]].<ref>{{cite web |title=ISO/IEC 2382, Information technology — Vocabulary |url=https://www.iso.org/obp/ui/#iso:std:iso-iec:2382:ed-1:v1:en}}</ref>
The term "language construct" is often used as a synonym for [[Control flow|control structure]].
 
[[Control flow]] statements (such as [[Conditional (computer programming)|conditionals]], [[foreach loop]]s, [[while loop]]s, etc) are language constructs, not functions[[Subroutine|function]]s. So <code>while (true)</code> is a language construct, while <code>add(10)</code> is a function call.
 
==Examples of language constructs==