|
@@ -1606,6 +1606,7 @@ type
|
|
|
mac: tmacro;
|
|
|
macrocount,
|
|
|
len: integer;
|
|
|
+ foundmacro: boolean;
|
|
|
begin
|
|
|
if not eval then
|
|
|
begin
|
|
@@ -1614,6 +1615,7 @@ type
|
|
|
end;
|
|
|
|
|
|
mac:=nil;
|
|
|
+ foundmacro:=false;
|
|
|
{ Substitue macros and compiler variables with their content/value.
|
|
|
For real macros also do recursive substitution. }
|
|
|
macrocount:=0;
|
|
@@ -1641,6 +1643,7 @@ type
|
|
|
move(mac.buftext^,hs[1],len);
|
|
|
searchstr:=upcase(hs);
|
|
|
mac.is_used:=true;
|
|
|
+ foundmacro:=true;
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
@@ -1659,9 +1662,9 @@ type
|
|
|
result:=texprvalue.try_parse_number(searchstr);
|
|
|
if not assigned(result) then
|
|
|
begin
|
|
|
- if assigned(mac) and (searchstr='FALSE') then
|
|
|
+ if foundmacro and (searchstr='FALSE') then
|
|
|
result:=texprvalue.create_bool(false)
|
|
|
- else if assigned(mac) and (searchstr='TRUE') then
|
|
|
+ else if foundmacro and (searchstr='TRUE') then
|
|
|
result:=texprvalue.create_bool(true)
|
|
|
else if (m_mac in current_settings.modeswitches) and
|
|
|
(not assigned(mac) or not mac.defined) and
|