2010/1/9 Jay Tennant <[email protected]>:
>> From: Ralph Versteegen <[email protected]>
>> Sent: Friday, January 08, 2010 7:33 PM
>>
>> 2010/1/9  <[email protected]>:
>> > jay
>> > 2010-01-08 10:01:43 -0800 (Fri, 08 Jan 2010)
>> > 329
>> > Adjusted gfx_LoadDllBackendProcs() to version 2. Added version 2 
>> > interfaces, though commenting the new gfx_Initialize() params, 
>> > gfx_ScreenShot() entirely, and gfx_GetVersion() entirely. Warnings thrown 
>> > when compiled: implicit conversion starting on line 207 (all the v2 
>> > interfaces loading, I think.) Someone know how to fix that?
>> > ---
>> > U   wip/backends.bas
>>
>> What's going on is that FB doesn't have the normal C concept of file
>> scope. Variables have to be declared 'extern' to be visible inside
>> functions (as is done in gfx.bi for the existing function pointers),
>> and then also defined with 'dim'.
>
> Ah, I see. When it is declared extern, does that make it visible to all files 
> that see its extern declaration, kind of like extern in C?

Yes, extern behaves the same way in C and FB. 'dim' outside of a
function behaves like a local variable in the implicit function
containing all the statements outside of a function (which is run at
start up time). 'dim shared' acts more like file scope in C, but I
don't know if its safe to 'dim shared' variables declared 'extern'. FB
has several bugs in this area.
_______________________________________________
Ohrrpgce mailing list
[email protected]
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

Reply via email to