Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: FreeBASIC module SDK for thinBasic_1.9.x.x

  1. #11
    Yes, it appears to be so. thinBasic derives its definition of integer from PowerBasic. ie: 16 bit signed integer. There is no formal boolean type, so integers are used as a substitute.

    However I notice that in the Windows API, a boolean is the same size as INT (32 bits) within a typedef, though only the first bit is significant.

    Thanks Joshy and Petr the FB-SDK update.

    I incorporated the ascii_to_float / float_to_ascii routines into Oxygen's run-time-libraries. With low level access, all values are passed and returned on the FPU stack, avoiding any loss of precision due to 'double' intermediaries.
    Last edited by Charles Pegge; 21-05-2013 at 12:24.

  2. #12
    Last edited by jack; 22-05-2013 at 22:45.

  3. #13
    thinBasic MVPs
    Join Date
    Oct 2012
    Rep Power
    i looked once again into fb - after a while - many years ago i tried to use it as programming language - but it was no fun.
    Now, after a lot of experimenting using powerbasic with all the headers of Josť Roca, the cWindow-class, his csed etc. and a look again into fb i was surprised. When it needed always very long until freebasic made some significant moves forward and i see now what Josť has contributed there - unbelievable! not only all the stuff that you know that was present in powerbasic but a lot more.

    It's somehow as if powerbasic was integrated to freebasic (both very much derive from the same "basic" Basic languages that were there in the late 1980s.
    But since powerbasic is no more improving and no more bugfixes nor updates are to await and since Josť ported all his works into fb - including anything you could think of (tools, templates, hundreds of samples, hundreds of headers, wrappers and workarounds to avoid running into faulty code of the OS - convince me to change the equipment and i would like to use fb to create one or the other thinbasic module...

    But the is a bit ... overaged. And i remember there was some hassle using strings into both directions but since main-process and dll can share the same memory i would in any case prefer to pass the data just using pointers to heap or hash instead of fighting with fb's zStrings (seems global heap that is locked, using tb-heap-functions on fb-zstring crashed as far as i remember.
    Now the provides an arsenal of shared hash-functions which is probably solving all issues when it comes to strings and it has the advantage that we can use a continous row of keys as "key_0001", key_0002... and continue receive function-results by (ab)using a callback as invoker.

    I would appreciate a few more examples that describe the use of some sdk-functions ,
    for example there is a constructor and a destructor-method on module classes (_Create and _Destroy) i can declare new methods and emulate subs and functions even with a wild approach of passing keywords and parameters in a mixture that you would shake your head if yoi would see that.

    But there are also properties that i can declare- so i never saw an example and i am not sure how properties are to create since i know from other languages these properties have Let, Get and Set to initialize, retrieve or alter the values of a property. if i have a property "Size" how is it initialized and how do i create the properties as up to 3 functions like
    ' within  function LoadLocalSymbols :
         thinBasic_Class_AddProperty(pClass,"_Let_Margin", %thinBasic_ReturnNone, CODEPTR(cDag_Let_Margin)
        thinBasic_Class_AddProperty(pClass,"_Get_Margin", %thinBasic_ReturnCodeLong, CODEPTR(cDag_Get_Margin)
         thinBasic_Class_AddProperty(pClass,"_Set_Margin", %thinBasic_ReturnNone, CODEPTR(cDag_Set_Margin))
    or do i have toi use "Margin_SET", "Margin_LET", "Margin_GET" or is it all in one?
    as just
         thinBasic_Class_AddProperty(pClass,"_property_Column", %thinBasic_ReturnCodeLong, CODEPTR(cDag_property_Column))
    And is a property here limited to ONE VALUE ONLY ? (width, separate height...) or can it be a whole virtual udt as
    lVal(2,3) As Long
    And mentioning virtual - can i use thinBasic_AddVariable to create a variable inside of a tb-scriptfunction that is placed at some memory within the module?
    If it can do this -will that work also placing an udt virtually upon some position or is there a function that can do something like that?

    And can i declare the win32-api-heap-functions within the module to use the same heap as the script functions will do? if yes- is it process heap or private heap
    what we use in the sscripts?

    just one more:
    is it to use for
    Declare Function myModulefunction Lib "thismodule.dll" Alias "myModFunc" ([parameters])
    or to wrap api-functions to make these available in thinBasic scripts?
    Or to make a thinbasic corefunction available to the module?
    I think there are missing some Forum-sections as beta-testing and support

  4. #14
    hello ReneMiner
    the FreeBasic manual has a good amount of information, it also includes tutorials you can download the manual from or you can read the FBWiki

  5. #15
    thinBasic MVPs
    Join Date
    Oct 2012
    Rep Power
    i have plenty of docs for fb, thanks. My questions were more about tb and how to use tb-sdk-functions with fb
    I think there are missing some Forum-sections as beta-testing and support

Page 2 of 2 FirstFirst 12

Similar Threads

  1. FireFly for FreeBasic
    By ErosOlmi in forum Free Basic
    Replies: 4
    Last Post: 22-06-2010, 05:37
  2. Freebasic to get C emitter
    By Charles Pegge in forum Software discussion
    Replies: 6
    Last Post: 22-01-2010, 08:16
  3. FreeBasic strings
    By ErosOlmi in forum Module SDK (Freebasic version)
    Replies: 12
    Last Post: 21-11-2008, 08:28
  4. FreeBasic - EBasic
    By kryton9 in forum Free Basic
    Replies: 10
    Last Post: 16-04-2008, 07:50
  5. Freebasic SDK
    By ErosOlmi in forum Module SDK (Freebasic version)
    Replies: 7
    Last Post: 19-06-2007, 20:27

Members who have read this thread: 1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts