That's interesting!
Seems that it only happens when the first compare sign is the less '<' char.
Looks like any other combination works (tested with TSE 4.50.20).
proc Main()
if 'a'
<>
'b'
Warn('Irrelevant 1')
else
Warn('Irrelevant 2')
endif
PurgeMacro(CurrMacroFilename())
end Main
// error
// if 'a'
// <>
// 'b'
// error
// if 'a'
// <
// 'b'
// error
// if 'a'
// <=
// 'b'
// works
// if 'a'
// >=
// 'b'
// works
// if 'a'
// ==
// 'b'
// works
// if 'a'
// >
// 'b'
CH> Muwahaha (evil laughter): From now on I can blame any unreadable macro programs on the compiler!
Nice one!
Well, you know it's a bad day when your horrible tasting toothpaste turn out to be Preparation-H ;-)
--
Best regards
Eckhard
Ihre Nachricht vom Montag, 23. März 2026 09:46:
CH> I need to compare two very long pieces of syntax that each result in a string.
CH> A shortened example of that would be
CH> if 'a' <> 'b'
CH> The compiler accepts that and produces a correctly running macro.
CH> For readability (because the real syntax is very long), I changed that to
CH> if 'a'
CH> <>
CH> 'b'
CH> Unfortunately, the compiler then returns the error "numeric expression expected".
CH> Below is a full example macro.
CH> Muwahaha (evil laughter): From now on I can blame any unreadable macro programs on the compiler!
CH> Carlo
CH> proc Main()
CH> if 'a'
CH> <>
CH> 'b'
CH> Warn('Irrelevant 1')
CH> else
CH> Warn('Irrelevant 2')
CH> endif
CH> PurgeMacro(CurrMacroFilename())
CH> end Main
CH>