Please enable JavaScript.
Coggle requires JavaScript to display documents.
Chapter 5 (Variables (特徵化屬性(6種) (Value (l-value : 位址, r-value : 值), Name :…
Chapter 5
-
Scope
-
-
Static Scope
-
-
-
範例 : :fire::fire::fire:圖p.5-50, 5-52
-
Binding
-
Binding time
-
-
-
整理
Design : 運算子, 100為整數, 可用的type
-
Compile : 變數資料型態, 特定data type的運算
-
Type Binding
Static Type binding
-
宣告方式
-
Implicit : 使用默認機制宣告變數型態 or type inference(static)( 易寫性↑, 可讀性↓)
-
-
-
-
Type Inference
Static : var = ? (int, float, string)
-
-
Lifetime
-
將變數根據lifetime作分類
-
-
Explicit heap-dynamic
-
僅能透過指標與參考 (e.g. dynamic objects in C++ (via new and delete), all objects in Java)
-
-
-
-