'=' - operand expected when trying to assign constant - solved

 
#define FLAT = "h1_flat";


//... some code
string trend = FLAT;

Getting error

'=' - operand expected SignalGenerator.mqh 69 25

When I do not use constant but assign string, no error. Does not make sense. What is wrong here? How to assing constant to variable?


Update:

solved - had to be this way. But it did not show any error near #define when it was done wrong. Also does not make sense.

#define FLAT "flat";
 
You wrote
Translates to
#define FLAT = "h1_flat";string trend = FLAT;
string trend = = "h1_flat";;


You wrote
Translates to
#define FLAT "flat";string trend = FLAT;
string trend = "h1_flat";;

No semicolon on #defines.
 
William Roeder:
You wrote
Translates to


You wrote
Translates to

No semicolon on #defines.

interesting. I think will try to avoid it, looks like makes code less readable :)

thanks