This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "Language construct" – news ·newspapers ·books ·scholar ·JSTOR(January 2021) (Learn how and when to remove this message) |
Incomputer programming, alanguage construct is asyntactically allowable part of aprogram that may be formed from one or morelexical tokens in accordance with the rules of theprogramming language, as defined by in theISO/IEC 2382 standard (ISO/IEC JTC 1).[1]Aterm is defined as a "linguistic construct in aconceptual schema language that refers to an entity".[1]
While the terms "language construct" and "control structure" are often used synonymously, there are additional types of logical constructs within a computer program, includingvariables,expressions,functions, ormodules.
Control flow statements (such asconditionals,foreach loops,while loops, etc.) are language constructs, notfunctions. Sowhile(true) is a language construct, whileadd(10) is a function call.
InPHPprint is a language construct.[2]
<?phpprint'Hello world';?>
is the same as:
<?phpprint('Hello world');?>
In Java aclass is written in this format:
publicclassMyClass{//Code . . . . . .}
In C++ a class is written in this format:
classMyCPlusPlusClass{//Code . . . .};
Thisprogramming-language-related article is astub. You can help Wikipedia byadding missing information. |