introduction of computer science(Note 1)

    A statement of fact is a definition or an axiom, it tells you how you might test something but it doesn't tell you how to ,this called imperative knowledge.

 

Imperative knowledge is a description of how to deduce something.

 

The program counter points to some location in memory, typically to the first instruction in the sequence.Program is a recipe.

 

 

Three dimensions of a language

 

  • High-level / low-level
  • General / targeted
  • Interpreted / Compiled
    • interpreted
      • the code may go through a simple checker but it basically goes to the interpreter that thing inside the machine,and it's going to control the flow of going through each one of the instructions.So the interpreter is simply operating directly on your code at run time.
    • Compiled
      • In comiled language,it has an intermediate step in which you take the source code,it runs through what's called a checker or a compiler or both,and it creates what's called object code.It means two things,it help catch bugs in code and it often converts it into a more efficient sequence of instructions before you actually go off and run it.

 

  • An interpreted language is often easier to debug,because we can still see our raw code there but it's not always as fast,a compiled language is usually much faster.

 

 

Syntax / Semantics

 

  • Syntax
    • Means what are the legal expressions in this language.

 

  • Semantics(static semantics & full semantics)
    • Static semantics
      • Which programs are meaningful
      • Which expressions make sense
    • Full semantics
      • What does the program mean?(what's going to happen when I run it)
發佈了8 篇原創文章 · 獲贊 9 · 訪問量 2192
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章