2012年11月1日

[MQL4]My first EA - 3

程式碼 : #
#property copyright "Coders Guru"
#property link "http://www.forex-tsd.com"


"#"表示的是MT4的預處理流程
有以下4種語法


#define identifier value
#property identifier value
#include <file_name>
#import "file_name"

Using the #define construction, one can define the symbolic name or 
symbolic constant at the program start to be the specific symbol string. Later 
on, the compiler will replace all appearances of this name without quotation 
marks with the corresponding string. In fact, this name can be replaced by any 
absolutely arbitrary text, not necessary with digits:



#define 定義一個常數值,這是最強的定義





#define COMPANY_NAME "MetaQuotes Software Corp."
Print("Copyright © 2001-2007, ",COMPANY_NAME);
result:
Copyright © 2001-2007,MetaQuotes Software Corp.

沒有留言:

張貼留言