What does 'Language Construct' mean?

前端 未结 9 493
鱼传尺愫
鱼传尺愫 2020-12-14 15:17

I am learning C from \'Programming in C\' by Stephen Kochan.

Though the author is careful from the beginning only not to confuse the students with jargon, but occas

相关标签:
9条回答
  • 2020-12-14 16:02

    First, you need to understand what a constructed language is. All programming languages are constructed languages (read the reference). You may then read a little bit about compiler construction, including this reference as well.

    Going back to your question, consider this: The English language (a natural language) has tokens 'A-Z/0-9/,;"...' which we use to build "words" and we use languages rules to build sentences out of words. So, in the English language, a construct is what we build out of tokens.

    Consider this brick-and-mortar example: Imagine if you set out to build a house, the basic materials you might use are: sand, iron, wood, cement, water (just five for simplicity). Anything you build out of these 4 or 5+ items would be a "construct", which in turn helps you build your house.

    I have intentionally omitted details to further simplify the answer; hope this is helpful.

    0 讨论(0)
  • 2020-12-14 16:11

    In reference to a programming language

        Language Constructs mean the basic constructs of a programming languge e.g
    1. Conditions (if, else, switch)
    2. Loops (For, While, Do-while) etc
    
    0 讨论(0)
  • 2020-12-14 16:12

    Without seeing the context that the phrase is used in, I cannot be sure, but generally the phrase 'language construct' just means the combination of keywords, grammar and structure of a coding language. Basically, how to format/write/construct a piece of code.

    0 讨论(0)
提交回复
热议问题