Sinsi is right, the docs are right. The problem with .if .type main eq 1 is that you must write it as .if (.type main eq 1) to understand what it does. The expression .type main eq 1 gets evaluated at assembly time and results to zero. Which means that
.if .type main eq 1
is exactly the same as
.if 0 ; (and you could write that as .if FALSE, too)
Now unfortunately .if 0 and .if 1 are not explicitly documented. What they do is as follows:
int 3 ; let the debugger stop here
.if 0
mov eax, 111h
mov ebx, 222h
mov ecx, 333h
.endif
mov eax, eax ; we just insert a meaningless instruction to understand where we are in the disassembly
.if 1
mov edx, 444h
mov esi, 555h
mov edi, 666h
.endif
nop
nop
Now watch what the .if 0 does - it inserts a jmp 4010B6, which is actually the mov eax, eax:
CPU Disasm
Address Hex dump Command Comments
004010A4 ³. CC int3
004010A5 À. EB 0F jmp short 004010B6
004010A7 Ú. B8 11010000 mov eax, 111
004010AC ³. BB 22020000 mov ebx, 222
004010B1 ³. B9 33030000 mov ecx, 333
004010B6 ³> 8BC0 mov eax, eax ; the meaningless 'delimiter'
C0003 ³. BA 44040000 mov edx, 444
004010BD ³. BE 55050000 mov esi, 555
004010C2 ³. BF 66060000 mov edi, 666
004010C7 ³. 90 nop
004010C8 ³. 90 nop
In short, .if 0 protects its branch against execution, but the code inside will still be generated. Note also that .if 1 does ... nothing, absolutely nothing. It just gets completely ignored by the assembler.