Search found 250 matches

by TeeEmCee
Apr 28, 2009 14:53
Forum: General
Topic: Redim Bug!?
Replies: 13
Views: 1918

I like to think of this as a bug in FB's type checking. It should really throw a run- or compile-time error. It's been a while since I studied FB's array code and assembly generation in detail and wrapped this added type checking around the RTlib, but I think there was a simple hack to determine whe...
by TeeEmCee
Sep 26, 2007 13:58
Forum: General
Topic: Global variable types not exported
Replies: 0
Views: 917

Global variable types not exported

Global variables which are arrays don't seem to have their types exported in the symbol table. For example (at top of main module): DIM plotstr(15) as Plotstring (gdb) ptype PLOTSTR type = <unknown type> (gdb) p PLOTSTR $3 = <error type> I can get around this by writing: (gdb) p (PLOTSTRING[16]) **(...
by TeeEmCee
Sep 04, 2007 15:10
Forum: General
Topic: In which direction do you want for FreeBASIC to develop?
Replies: 44
Views: 9638

GCC as backend is my most desired feature - even over OOP - because of compiling for Macs and GP2X handhelds and similar. Even if the fbgfx library, or OS functions like threads and mutexs can't be guaranteed on other platforms, that wouldn't trouble me at all: just use SDL! I agree with Pritchard. ...
by TeeEmCee
Aug 24, 2007 12:36
Forum: General
Topic: Preprocessor depths
Replies: 7
Views: 1655

So, imagine your code with the macro being replaced with what it would expand to. That should help you understand why there might be scope issues or some such. Although, I'm not really sure about a lot of it :-) I don't follow. C:/FreeBASIC/FBIDETEMP.bas(2) error 77: Recursive DEFINE not allowed, f...
by TeeEmCee
Aug 21, 2007 13:49
Forum: General
Topic: Preprocessor depths
Replies: 7
Views: 1655

Preprocessor depths

A search of the forums and of the manual produces very little information about the preprocessor, so I'm asking here. The FB preprocessor understands the scope of the actual code. That's great, but how do you define a macro or #define rule inside a block of code so that it is defined globally? defin...
by TeeEmCee
Aug 03, 2006 5:56
Forum: Tips and Tricks
Topic: GOSUB in SUB
Replies: 7
Views: 3836

Hmm. Here's what I used: #include "crt.bi" '#include "crt/setjmp.bi" ' setjmp.bi is incorrect type crt_jmp_buf:dummy(63) as byte:end type #ifdef __FB_WIN32__ declare function setjmp cdecl alias "_setjmp" (byval as any ptr) as integer #else declare functi...
by TeeEmCee
Jul 24, 2006 12:14
Forum: Tips and Tricks
Topic: (FBMLD) FreeBASIC Memory Leak Detector
Replies: 51
Views: 21153

Re: (FBMLD) FreeBASIC Memory Leak Detector

Ah, the uses of preprocessor redefines... Note: You must use parentheses in allocate/callocate/reallocate/deallocate calls when using FBMLD. For example, this won't work: deallocate p Instead, write this: deallocate(p) *plugplug* Since FB has argument lists without parenthesises, wouldn't it...
by TeeEmCee
Jul 23, 2006 5:21
Forum: General
Topic: The wiki lies/FB 0.16b broke my code
Replies: 11
Views: 1952

Extern? Hmm.. these aspects of QB/FB still remain arcane to me... as I understand, common shared declares extra modular global variables, requiring a seperate dimming of arrays, whereas extern functions like you would expect straight forward C-like globals to. In that case, I see why extern is (righ...
by TeeEmCee
Jul 22, 2006 8:51
Forum: General
Topic: The wiki lies/FB 0.16b broke my code
Replies: 11
Views: 1952

Comeon SURELY such a bug would break 90% of programs. Is there anyone out there actually using 0.16b, or is everyone using the 0.17b WIP??
by TeeEmCee
Jul 22, 2006 3:52
Forum: General
Topic: The wiki lies/FB 0.16b broke my code
Replies: 11
Views: 1952

The wiki lies/FB 0.16b broke my code

I'll stick this in the newbie questions forum since it deals with some pretty basic stuff. I've been porting some FB code that ran fine with 0.15b to work with 0.16b (cleaning up gosubs and retranslated headers and all that). Was I ever shocked to discover that I can no longer share arrays between m...

Go to advanced search