與 C/C++ 不同之處
- no address arithmetic; 沒有指標
- no goto operator; 沒有 Goto 的跳躍
- an anonymous enumeration can't be declared; 匿名的 enum 無法宣告
- no multiple inheritance. 無法如標準的 C++ 可多重繼承
除此之外筆者的建議是從 C/C++ 學習就可以了。
使用 //
或是 /*
與 */
將註解內文包覆
//--- Single-line comment
/* Multi-
line // Nested single-line comment
comment
*/
用以對 變數(variables) 與 函式(functions) 的命名, 規則是
- 小於等於 63 個字元
- 可使用數字 0-9、a-z、A-Z、_(底線)
- 大小寫視為不同
- 字首不能使用數字
- 保留字無法使用
保留字為語法本身的關鍵字, 已經具有特殊用途而無法作為其他用途再使用
參考至 官網列表 |
---|
Data Type |
bool |
char |
class |
color |
datetime |
double |
Access Specificators |
const |
public |
Memory Classes |
extern |
Operators |
break |
case |
continue |
default |
delete |
Other |
false |
this |
true |
strict |
input 為 MQL4/5 特有, 用來作為定義程式的輸入參數介面