주시
1
0
포크
이미 MQL5Book을(를) 포크했습니다
0
원본 프로젝트 rosh/MQL5Book
MQL5Book/Scripts/p2/ExternHeader2.mqh
32 라인
1.1 KiB
MQL5
super.admin
2025-05-30 16:09:41 +02:00
//+------------------------------------------------------------------+
//| ExternHeader2.mqh |
//| Copyright 2021, MetaQuotes Ltd. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#ifdef USE_INCLUDE_WORKAROUND
// a replacement for extern variable could be:
#include "ExternCommon.mqh" // which contains:
//+------------------------------------------+
//| /* ExternCommon.mqh */ |
//| int x; |
//+------------------------------------------+
#else
extern int x;
#endif
// ERROR:
// extern short y; // variable 'y' already defined with different type
//+------------------------------------------------------------------+
//| Mockup decrement function using 'x' |
//+------------------------------------------------------------------+
void dec()
{
x--;
}
//+------------------------------------------------------------------+