Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Language construct

From Wikipedia, the free encyclopedia
Syntactically valid part of a program formed from lexical tokens
icon
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.

Examples of language constructs

[edit]

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 . . . .};

References

[edit]
  1. ^ab"ISO/IEC 2382, Information technology — Vocabulary".
  2. ^"PHP: print - Manual".www.php.net. Retrieved2022-11-18.
Stub icon

Thisprogramming-language-related article is astub. You can help Wikipedia byadding missing information.

Retrieved from "https://en.wikipedia.org/w/index.php?title=Language_construct&oldid=1320649414"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp