News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

.if statement error

Started by jag, February 19, 2007, 10:23:57 PM

Previous topic - Next topic

jag

When I try this:
.if (EXCEPTION_RECORD ptr [ecx]).ExceptionCode == EXCEPTION_ACCESS_VIOLATION
I get: error A2154: syntax error in control-flow directive


BUT! If I use this syntax:
.if [ecx][EXCEPTION_RECORD.ExceptionCode] == EXCEPTION_ACCESS_VIOLATION
everything is fine.

u

I usually use this syntax:

.if [ecx].EXCEPTION_RECORD.ExceptionCode==EXCEPTION_ACCESS_VIOLATION

Typing additional  "( ptr )" instead of "." is too slow/bothersome :)
Please use a smaller graphic in your signature.

jag

Aye thanks for tip - that does look easier to type. Is there any reason why the PTR version doesn't work though?

u

masm's handling of rounded brackets is not ironed-out, maybe by design. Since ".if" handles bracketed statements to manage order of comparison-execution, the "( ptr )" way complicates things too much. And since the code becomes harder to read that way, it's not worthy of solving.
Please use a smaller graphic in your signature.