Question: Why does $ifdef __FILE__ evaluate to false in the beginning of an .mpl file?

Consider the following code in an .mpl file

$define MACRO1 "1"

$define MACRO2 "2"

 

$ifdef __FILE__

$define MACRO3 "3"

$endif

 

$ifdef MACRO1

$define MACRO4 "4"

$endif

 

f := proc()

print(MACRO1, MACRO2, MACRO3, MACRO4, __FILE__):

end:

If we run this from a worksheet and call the procedure f, the printed output is

"1", "2", MACRO3, "4", "/Users/zenterix/..."

Why does $ifdef __FILE__ evaluate to false? Ie, why doesn't MACRO3 get defined? I thought __FILE__ was a predefined macro.

Please Wait...