Search found 499 matches

by voodooattack
Oct 29, 2007 17:06
Forum: General
Topic: Errors with newest FB-Version 18.2 (and 28.10.2007)
Replies: 8
Views: 2049

not sure if this is even remotely related, but the wiki indicates that ScreenEvent is a function that returns an integer value, however, while re-compiling some old sources, I started getting errors about it from the compiler, like this one (trying to compile the wiki example here ), i think the com...
by voodooattack
Oct 27, 2007 15:05
Forum: Beginners
Topic: probably stupid question but....
Replies: 3
Views: 1111

yes. :)

here's a small example:

Code: Select all

    var f = freefile
   
    open "lightwave.txt" for input as #f
        dim s as String
        do
            line input #f, s
            print s
        loop until eof(f)
    close #f
   
   
by voodooattack
Oct 26, 2007 20:27
Forum: Beginners
Topic: editable window
Replies: 8
Views: 1774

** WINDOWS ONLY, the solution provided by pritchard is cross-platform, mine is not, however, here's something i hacked up in 10 minutes (spent most of it commenting the code), it's fairly simple, but i think it's what you're asking for.. if you face any problems, please let me know, always glad to h...
by voodooattack
Aug 03, 2007 1:44
Forum: General
Topic: Can i programming an Freebasicinterpreter with the FB source
Replies: 5
Views: 1507

You can always modify the FreeBASIC source code, as long as you adhere to the terms of the license it's released under, which is GPL (basically, if you modify the code, you must release it as open-source under the same license) http://www.gnu.org/copyleft/gpl.html As for your problem, I think the be...
by voodooattack
Jul 28, 2007 0:27
Forum: Beginners
Topic: How to call a C library?
Replies: 8
Views: 4801

pdf = HPDF_New(@error_handler, NULL) Using the @ prefix is the equivalent of using ProcPtr(error_handler), and is used to obtain the address of your callback procedure, without it, FreeBASIC will assume that you're trying to call the "error_handler" procedure (and if it was a function, pass...
by voodooattack
Jul 27, 2007 21:15
Forum: Beginners
Topic: How to call a C library?
Replies: 8
Views: 4801

this translates to: type HPDF_HANDLE as any ptr type HPDF_Doc as HPDF_HANDLE type HPDF_Page as HPDF_HANDLE type HPDF_Pages as HPDF_HANDLE type HPDF_Stream as HPDF_HANDLE type HPDF_Image as HPDF_HANDLE type HPDF_Font as HPDF_HANDLE type HPDF_Outline as HPDF_HANDLE type HPDF_Encoder as HPDF_HANDLE typ...
by voodooattack
Jul 25, 2007 1:46
Forum: Tips and Tricks
Topic: Associative arrays that actually look like arrays
Replies: 23
Views: 8881

just be sure to add (#inclib "hashtable") anywhere in your file, or just add it to "hashtable.bi" :)
by voodooattack
Jul 18, 2007 19:15
Forum: General
Topic: (DBPro) Procedure export name
Replies: 8
Views: 1571

Thank you :)
by voodooattack
Jul 17, 2007 22:34
Forum: General
Topic: (DBPro) Procedure export name
Replies: 8
Views: 1571

Your problem is the MSVC mangling scheme, which is not supported by the GNU tools, but for every problem, there's a solution, and here it is. Plugin.bas extern "C" declare sub ReceiveCoreDataPtr cdecl(byval as any ptr) sub ReceiveCoreDataPtr cdecl(byval pCoreData as any ptr)...
by voodooattack
Jul 15, 2007 16:13
Forum: Tips and Tricks
Topic: Pseudo Exception Handling (Try/Catch and Throw) In FB
Replies: 2
Views: 1894

KaraK wrote:very nice , would this avoid memory access violations while using bad ptrs ?


nope, no real exceptions.. =/

I'll see about making a windows-only version though, with real SEH integration, maybe that'd work :)
by voodooattack
Jul 15, 2007 16:09
Forum: General
Topic: BUG: TypeOf() not working as expected
Replies: 16
Views: 2694

well, that works, but it's not my goal..
your code can't tell the type-name of any UDTs passed, and if i'm going to implement an exception fall-through mechanism, it should be able to handle "classes", so that's basically what i'm willing to do :)
by voodooattack
Jul 15, 2007 5:49
Forum: Tips and Tricks
Topic: Pseudo Exception Handling (Try/Catch and Throw) In FB
Replies: 2
Views: 1894

Pseudo Exception Handling (Try/Catch and Throw) In FB

Only syntax emulation, no real exceptions (seg faults, etc). fbexcept.bi #IFNDEF __FBEXCEPT_BI__ #DEFINE __FBEXCEPT_BI__ #include once "crt/setjmp.bi" #macro defexcp(t) type __e_ctx__ as jmp_buf ptr pJmp as integer bCaught = 0 as typeof(t) ptr eThrown = 0 end type extern ex...
by voodooattack
Jul 15, 2007 4:47
Forum: General
Topic: BUG: TypeOf() not working as expected
Replies: 16
Views: 2694

I think TYPEOF should behave exactly like a macro/define, however, it's not doing so.. =P oh well.. I faced this behavior while writing some exception handling macros (i wanted the exception handler to be able to check the data-types passed and pass unsupported data-types through to the next handle...
by voodooattack
Jul 15, 2007 3:59
Forum: General
Topic: BUG: TypeOf() not working as expected
Replies: 16
Views: 2694

BUG: TypeOf() not working as expected

this works: #print TYPEOF(Integer) however, preprocessor stringizing will not work: print #TYPEOF(Integer) nor does concatenation: #print test##TYPEOF(Integer) I think TYPEOF should behave exactly like a macro/define, however, it's not doing so.. although i remember the secon...
by voodooattack
Jul 14, 2007 8:15
Forum: Projects
Topic: IrrKlangWrapper (3D Sound API)
Replies: 7
Views: 3693

great work :)

although i don't think you can release the wrapper under GPL, since it means that anything it links with should be licensed under GPL or a GPL compatible license. and that's not the case with the library you're writing the wrapper for :)

Go to advanced search