Language construct: Difference between revisions

Content deleted Content added
AnomieBOT (talk | contribs)
m Dating maintenance tags: {{Clarify}}
m Addition of examples of language constructs & additional, simpler definition.
Line 1:
{{Unreferenced stub|auto=yes|date=December 2009}}
 
A '''language construct''' is a [[syntax|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 a [[programming language]]. In simpler terms, it is the syntax/way a programming language is written.
 
The term "language construct" is often used as a synonym for [[Control flow|control structure]], and should not be confused with a [[Subroutine|function]].{{clarify|so what's the difference? is a construct something that can be recognized by a recognizer finite-state machine?|date=January 2017}}
Line 24:
[[Category:Programming constructs]]
 
In Java a class is written in this format:<syntaxhighlight lang="java">
public class MyClass {
//Code . . . . . .
}
</syntaxhighlight>
 
In C++ a class is written in this format:<syntaxhighlight lang="c++">
class MyCPlusPlusClass {
//Code . . . .
};
</syntaxhighlight>
 
{{Compu-lang-stub}}