Content deleted Content added
Add text |
m basic grammar clarification Tags: Visual edit Mobile edit Mobile web edit |
||
(4 intermediate revisions by 4 users not shown) | |||
Line 1:
{{Short description|Syntactically valid part of a program formed from lexical tokens}}
{{More sources|date=January 2021}}
A '''term''' is defined as a "linguistic construct in a [[conceptual schema]] language that refers to an entity".<ref name="ISO/IEC 2382"/>
While the terms "language construct" and "control structure" are often used synonymously, there are additional types of logical constructs within a computer program, including [[variable (computer science)|variables]], [[expression (computer science)|expressions]], [[function (computer science)|functions]], or [[modular programming|modules]].
[[Control flow]] statements (such as [[Conditional (computer programming)|conditionals]], [[foreach loop]]s, [[while loop]]s, etc) are language constructs, not functions. So <code>while (true)</code> is a language construct, while <code>add(10)</code> is a function call.▼
▲[[Control flow]] statements (such as [[Conditional (computer programming)|conditionals]], [[foreach loop]]s, [[while loop]]s, etc) are language constructs, not
==Examples of language constructs==
In [[PHP]] <code>print</code> is a language construct.<ref>{{Cite
<syntaxhighlight lang="php">
<?php
Line 36 ⟶ 39:
};
</syntaxhighlight>
==References==
{{reflist}}{{Compu-lang-stub}}
|