Moderators: Nexuiz Moderators, Moderators
Alien wrote:This is not a question of else if {} and else {} but between else if {} and else { if {}}
>more else1.c
int main(void)
{
if (1) {}
else
{
if (1) {}
}
return 0;
}
>more else2.c
int main(void)
{
if (1) {}
else
if (1) {}
return 0;
}
>icl else1.c
-out:else1.exe
else1.obj
>icl else2.c
-out:else2.exe
else2.obj
>fc else1.exe else2.exe
Comparing files else1.exe and ELSE2.EXE
000000E8: [color=red]9F A2[/color]
>pedump else1.exe
Dump of file ELSE1.EXE
File Header
Machine: 014C (i386)
Number of Sections: 0003
TimeDateStamp: 4A8117[color=red]9F[/color] -> Tue Aug 11 10:02:55 2009
PointerToSymbolTable: 00000000
NumberOfSymbols: 00000000
SizeOfOptionalHeader: 00E0
Characteristics: 0103
RELOCS_STRIPPED
EXECUTABLE_IMAGE
32BIT_MACHINE
.
.
.
>pedump else2.exe
Dump of file ELSE2.EXE
File Header
Machine: 014C (i386)
Number of Sections: 0003
TimeDateStamp: 4A8117[color=red]A2[/color] -> Tue Aug 11 10:02:58 2009
PointerToSymbolTable: 00000000
NumberOfSymbols: 00000000
SizeOfOptionalHeader: 00E0
Characteristics: 0103
RELOCS_STRIPPED
EXECUTABLE_IMAGE
32BIT_MACHINE
.
.
.

Ixion wrote:@Alien: Why did you write else and if on different lines? Should it not be "else if" on 1 line?
if (bla)
{
blu;
}
return 0;if (bla)
{
blu;
}
else
{
blo;
}
return 0;if (bla)
{
blu;
}
else if
{
blo;
}
else
{
ble;
}
return 0;else3.c:
int main(void)
{
if (1) {}
else
;;;;;; {}
;; ;;;; {}
;;; {}
;;; {}
;; {}
;; {}
;; {}
if (1) {}
return 0;
}
else4.c:
int main(void)
{
if (1) {}
else if (1) {}
return 0;
}
>fc else3.exe else4.exe
Comparing files else3.exe and ELSE4.EXE
000000E8: 99 94

Mizu Kitsune wrote:i believe we are talking QuakeC rather than C.
void ifelif()
{
if(TRUE)
{
print("true\n");
} else if(FALSE) {
print("false\n");
}
}void () ifelif;
void() ifelif = asm
{
IFNOT FILE_APPEND, 4;
STORE_F "true
", parm0_x;
CALL1 print;
GOTO 4;
IFNOT KEY_GAME, 3;
STORE_F "false
", parm0_x;
CALL1 print;
DONE;
}
void ifelif()
{
if(TRUE)
{
print("true\n");
} else {
if(FALSE)
print("false\n");
}
}void () ifelif;
void() ifelif = asm
{
IFNOT FILE_APPEND, 4;
STORE_F "true
", parm0_x;
CALL1 print;
GOTO 4;
IFNOT KEY_GAME, 3;
STORE_F "false
", parm0_x;
CALL1 print;
DONE;
}


ai wrote:Mizu Kitsune wrote:i believe we are talking QuakeC rather than C.
QC and C is basically the same thing right? That's how I understood it, so there shouldn't really be any differences (or the huge at least) in those cases.
Mizu Kitsune wrote:completely different.

Return to Nexuiz - Development