2012年10月17日

[MQL4]Lesson 3. 注解

注解在寫程式是很重要的一個習慣
適當的注解可以讓你知道你的程式在寫什麼
或許你會懷疑, 自己寫的程式怎麼可能看不懂
等你開始一到兩年, 再拿出半年一年前的程式碼,你就知道了



在MQL4裡面用  //  作為注解, 和 C/C++ 一樣
例如
//This is a comment
extern int MA_Period=13;
例如
extern int MA_Period=13;//This is a comment

如果有很大量的文字需注解, 可以用 /* ... */
例如
/*
This is a program made by Cipher,
2012/10/18.
This is a system of ZigZag and simple MA cross over.
The profit is such awesome!! But MDD is 10%.
*/


沒有留言:

張貼留言