Revision history for TblComparisonC


Revision [21687]

Last edited on 2016-11-07 08:58:56 by fxm [Formatting]
Additions:
##<end-of-line>##>>
Deletions:
end-of-line>>


Revision [21667]

Edited on 2016-11-07 04:50:06 by fxm [Formatting]
Additions:
<<**""C/C++""**<<>>**""FreeBASIC""**>>
int a, b, c;##<<>>##dim a as integer
<<##int a;##<<>>##dim a as integer = any##>>
<<##int a = 0;##<<>>##dim a as integer##>>
<<##int a = 123;##<<>>##dim a as integer = 123##>>
a[0] = 1;##<<>>##dim a(0 to 3) as integer
*p = 123;##<<>>##dim a as integer
*p = 123##>>
}##<<>>##type UDT
<<##typedef int myint;##<<>>##type myint as integer##>>
p->myfield = 123;##<<>>##dim x as UDT
<<##int foo( void );##<<>>##declare function foo( ) as integer##>>
}##<<>>##function foo( ) as integer
<<##void foo( void );##<<>>##declare sub foo( )##>>
}##<<>>##sub foo( )
foo( a );##<<>>##declare sub foo( byval param as integer )
foo( a );##<<>>##declare sub foo( byref param as integer )
foo( a )##
>>
<<>>##:##
}##<<>>##for i as integer = 0 to 9
}##<<>>##while condition
} while (condition);##<<>>##do
}##<<>>##if condition then
}##<<>>##select case a
char s[] = "Hello!";##<<>>##dim s as zstring ptr = @"Hello!"
}##<<>>##print "Hello!"##
>>
""/* foo */""##<<>>##' foo
###endif##<<>>###if //a//##
<<###ifdef _WIN32##<<>>###ifdef ""__FB_WIN32__""##>>
<<##foo.c, foo.h##<<>>##foo.bas, foo.bi##>>
<<##gcc foo.c -o foo##<<>>##fbc foo.bas##>>
Deletions:
<<**""C/C++""**>><<**""FreeBASIC""**>>
int a, b, c;##>><<##dim a as integer
<<##int a;##>><<##dim a as integer = any##>>
<<##int a = 0;##>><<##dim a as integer##>>
<<##int a = 123;##>><<##dim a as integer = 123##>>
a[0] = 1;##>><<##dim a(0 to 3) as integer
*p = 123;>><<##dim a as integer
*p = 123>>
}##>><<##type UDT
<<##typedef int myint;##>><<##type myint as integer##>>
p->myfield = 123;##>><<##dim x as UDT
<<##int foo( void );##>><<##declare function foo( ) as integer##>>
}##>><<##function foo( ) as integer
<<##void foo( void );##>><<##declare sub foo( )##>>
}##>><<##sub foo( )
foo( a );##>><<##declare sub foo( byval param as integer )
foo( a );##>><<##declare sub foo( byref param as integer )
foo( a )
##>>
>><<##:##
}##>><<##for i as integer = 0 to 9
}##>><<##while condition
} while (condition);##>><<##do
}##>><<##if condition then
}##>><<##select case a
char s[] = "Hello!";##>><<##dim s as zstring ptr = @"Hello!"
}##>><<##print "Hello!"
##>>
/* foo */##>><<##' foo
###endif##>><<###if //a//##
<<###ifdef _WIN32##>><<###ifdef ""__FB_WIN32__""##>>
<<##foo.c, foo.h##>><<##foo.bas, foo.bi##>>
<<##gcc foo.c -o foo##>><<##fbc foo.bas##>>


Revision [16406]

Edited on 2012-10-26 13:18:28 by CountingPine [More preprocessor conditionals]
Additions:
{{fbdoc item="subsect" value="compile-time checks"}}
<<###if //a//##
###elif //b//##
###else##
###endif##>><<###if //a//##
###elseif //b//##
###else##
###endif##>>


Revision [16384]

Edited on 2012-10-18 11:36:06 by DkLwikki [better formatting]
Additions:
{{fbdoc item="subsect" value="uninitialized variable"}}
Deletions:
{{fbdoc item="" value="uninitialized variable"}}


Revision [16383]

Edited on 2012-10-18 11:35:46 by DkLwikki [better formatting]
Additions:
<<**""C/C++""**>><<**""FreeBASIC""**>>
{{fbdoc item="subsect" value="variable declaration"}}
int a, b, c;##>><<##dim a as integer
dim as integer a, b, c##>>
{{fbdoc item="" value="uninitialized variable"}}
<<##int a;##>><<##dim a as integer = any##>>
{{fbdoc item="subsect" value="zero-initialized variable"}}
<<##int a = 0;##>><<##dim a as integer##>>
{{fbdoc item="subsect" value="initialized variable"}}
<<##int a = 123;##>><<##dim a as integer = 123##>>
{{fbdoc item="subsect" value="array"}}
a[0] = 1;##>><<##dim a(0 to 3) as integer
a(0) = 1##>>
{{fbdoc item="subsect" value="pointer"}}
*p = 123;>><<##dim a as integer
*p = 123>>
{{fbdoc item="subsect" value="structure, user-defined type"}}
}##>><<##type UDT
end type##>>
{{fbdoc item="subsect" value="typedef, type alias"}}
<<##typedef int myint;##>><<##type myint as integer##>>
{{fbdoc item="subsect" value="struct pointer"}}
p->myfield = 123;##>><<##dim x as UDT
p->myfield = 123##>>
{{fbdoc item="subsect" value="function declaration"}}
<<##int foo( void );##>><<##declare function foo( ) as integer##>>
{{fbdoc item="subsect" value="function body"}}
}##>><<##function foo( ) as integer
end function##>>
{{fbdoc item="subsect" value="sub declaration"}}
<<##void foo( void );##>><<##declare sub foo( )##>>
{{fbdoc item="subsect" value="sub body"}}
}##>><<##sub foo( )
end sub##>>
{{fbdoc item="subsect" value="byval parameters"}}
foo( a );##>><<##declare sub foo( byval param as integer )
foo( a );##>>
{{fbdoc item="subsect" value="byref parameters"}}
foo( a );##>><<##declare sub foo( byref param as integer )
foo( a )
##>>
{{fbdoc item="subsect" value="statement separator"}}
>><<##:##
end-of-line>>
{{fbdoc item="subsect" value="for loop"}}
}##>><<##for i as integer = 0 to 9
next##>>
{{fbdoc item="subsect" value="while loop"}}
}##>><<##while condition
wend##>>
{{fbdoc item="subsect" value="do-while loop"}}
} while (condition);##>><<##do
loop while condition##>>
{{fbdoc item="subsect" value="if block"}}
}##>><<##if condition then
end if##>>
{{fbdoc item="subsect" value="switch, select"}}
}##>><<##select case a
end select##>>
{{fbdoc item="subsect" value="string literals, zstrings"}}
char s[] = "Hello!";##>><<##dim s as zstring ptr = @"Hello!"
dim s as zstring * 6+1 = "Hello!"##>>
{{fbdoc item="subsect" value="hello world"}}
}##>><<##print "Hello!"
##>>
{{fbdoc item="subsect" value="comments"}}
/* foo */##>><<##' foo
/' foo '/##>>
{{fbdoc item="subsect" value="compile-time target system checks"}}
<<###ifdef _WIN32##>><<###ifdef ""__FB_WIN32__""##>>
{{fbdoc item="subsect" value="module/header file names"}}
<<##foo.c, foo.h##>><<##foo.bas, foo.bi##>>
{{fbdoc item="subsect" value="typical compiler command to create an executable"}}
<<##gcc foo.c -o foo##>><<##fbc foo.bas##>>
Deletions:
<<""C/C++"">><<""FreeBASIC"">>
{{fbdoc item="section" value="variable declaration"}}
int a, b, c;##
>><<##dim a as integer
dim as integer a, b, c##
>>
{{fbdoc item="section" value="uninitialized variable"}}
<<##int a;##
>><<##dim a as integer = any##
>>
{{fbdoc item="section" value="zero-initialized variable"}}
<<##int a = 0;##
>><<##dim a as integer##
>>
{{fbdoc item="section" value="initialized variable"}}
<<##int a = 123;##
>><<##dim a as integer = 123##
>>
{{fbdoc item="section" value="array"}}
a[0] = 1;##
>><<##dim a(0 to 3) as integer
a(0) = 1##
>>
{{fbdoc item="section" value="pointer"}}
*p = 123;
>><<##dim a as integer
*p = 123
>>
{{fbdoc item="section" value="structure, user-defined type"}}
}##
>><<##type UDT
end type##
>>
{{fbdoc item="section" value="typedef, type alias"}}
<<##typedef int myint;##
>><<##type myint as integer##
>>
{{fbdoc item="section" value="struct pointer"}}
p->myfield = 123;##
>><<##dim x as UDT
p->myfield = 123##
>>
{{fbdoc item="section" value="function declaration"}}
<<##int foo( void );##
>><<##declare function foo( ) as integer##
>>
{{fbdoc item="section" value="function body"}}
}##
>><<##function foo( ) as integer
end function##
>>
{{fbdoc item="section" value="sub declaration"}}
<<##void foo( void );##
>><<##declare sub foo( )##
>>
{{fbdoc item="section" value="sub body"}}
}##
>><<##sub foo( )
end sub##
>>
{{fbdoc item="section" value="byval parameters"}}
foo( a );##
>><<##declare sub foo( byval param as integer )
foo( a );##
>>
{{fbdoc item="section" value="byref parameters"}}
foo( a );##
>><<##declare sub foo( byref param as integer )
foo( a )##
>>
{{fbdoc item="section" value="statement separator"}}
>><<##:##, end-of-line
>>
{{fbdoc item="section" value="for loop"}}
}##
>><<##for i as integer = 0 to 9
next##
>>
{{fbdoc item="section" value="while loop"}}
}##
>><<##while condition
wend##
>>
{{fbdoc item="section" value="do-while loop"}}
} while (condition);##
>><<##do
loop while condition##
>>
{{fbdoc item="section" value="if block"}}
}##
>><<##if condition then
end if##
>>
{{fbdoc item="section" value="switch, select"}}
}##
>><<##select case a
end select##
>>
{{fbdoc item="section" value="string literals, zstrings"}}
char s[] = "Hello!";##
>><<##dim s as zstring ptr = @"Hello!"
dim s as zstring * 6+1 = "Hello!"##
>>
{{fbdoc item="section" value="hello world"}}
}##
>><<##print "Hello!"##
>>
{{fbdoc item="section" value="comments"}}
/* foo */##
>><<##' foo
/' foo '/##
>>
{{fbdoc item="section" value="compile-time target system checks"}}
<<###ifdef _WIN32##
>><<###ifdef ""__FB_WIN32__""##
>>
{{fbdoc item="section" value="module/header file names"}}
<<##foo.c, foo.h##
>><<##foo.bas, foo.bi##
>>
{{fbdoc item="section" value="typical compiler command to create an executable"}}
<<##gcc foo.c -o foo##
>><<##fbc foo.bas##
>>


Revision [16382]

The oldest known version of this page was created on 2012-10-18 11:22:59 by DkLwikki [better formatting]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode