Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 30

Thread: FreeBasic SDK: extended data type

  1. #11

    Re: FreeBasic SDK: extended data type

    Hi Eros,

    The only complication is alignment in arrays.Are your arrays of extended numbers contiguous (stride of 10 bytes) or are they DWORD aligned (12 bytes)? PB packs them as 10 bytes.

    Extended numbers passed byval on the stack, I would expect to be padded to 12 bytes. as PB does.

  2. #12
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,795
    Rep Power
    10

    Re: FreeBasic SDK: extended data type

    thinBasic EXT arrays elements are 10 bytes.
    I suppose BYVAL EXT are passed pushing 4 bytes * 3 times. As far as I can see, BYVAL is not a problem, problem is BYREF.
    Anyhow I still need to make real tests. I've so much things to finish for next thinBasic release. But definitely will do a test run on this.

    I'm 100% rewriting SDK help material inside official thinBasic help file describing in details all interface functions (it's a big job). Doing that I'm trying to align as much as possible SDK for PowerBasic with SDK for FreeBasic interfaces. In future versions I will do the same for SDK for C. I feel those 3 languages (PowerBasic, FreeBasic, C) are the one worth to work with (for the moment) for thinBasic module development.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  3. #13
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,795
    Rep Power
    10

    Re: FreeBasic SDK: extended data type

    Quote Originally Posted by jack
    you may need to have Mingw32 installed, anyway attached is the one I just compiled with the latest FB
    I believe my system to be clean but recommend you check for virus.
    Ok, I've installed MinGW32, adjusted some path and I was able to create lib libreal10.a

    Thanks
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  4. #14

    Re: FreeBasic SDK: extended data type

    In that case I would adopt the extended type for freebasic as:


    [code=thinbasic]
    type exended ' 10 bytes
    dbl as dbl
    xtr as word
    end type
    [/code]

    Extended variables, including arrays can then be converted on entry and exit from the thinbasic module, without creating new variables.

    I look forward to the new SDK documentation. TOMDK was derived from the March 2008 release of the PB SDK - as was my provisional FB SDK. TOMDK found that some of the functions were absent from the current thincore.DLL. So I commented them out. here is the bind list:

    TOMDK
    bind thincore
     (
     thinBasic_LoadSymbol         thinBasic_LoadSymbol
     thinBasic_VariableExists       thinBasic_VariableExists
     thinBasic_VariableGetInfo       thinBasic_VariableGetInfo
     thinBasic_VariableGetInfoEX      thinBasic_VariableGetInfoEX
     thinBasic_VariableIsArray       thinBasic_VariableIsArray
     thinBasic_VariableRedim        thinBasic_VariableRedim
     thinBasic_ArrayGetElements      thinBasic_ArrayGetElements
     thinBasic_ArrayGetPtr         thinBasic_ArrayGetPtr
     thinBasic_ArrayGetInfo        thinBasic_ArrayGetInfo
     thinBasic_AddEquate          thinBasic_AddEquate
     thinBasic_AddVariable         thinBasic_AddVariable
     thinBasic_ChangeVariableNumber    thinBasic_ChangeVariableNumber
     thinBasic_ChangeVariableString    thinBasic_ChangeVariableString
     thinBasic_GetToken          thinBasic_GetToken
     thinBasic_GetTokenID         thinBasic_GetTokenID
     thinBasic_TokenGetCurrentID      thinBasic_TokenGetCurrentID
     thinBasic_PutBack           thinBasic_PutBack
     thinBasic_FunctionExists       thinBasic_FunctionExists
     thinBasic_FunctionSimpleCall     thinBasic_FunctionSimpleCall
     thinBasic_GetKeywordSpeficic     thinBasic_GetKeywordSpeficic
     thinBasic_VariableParse        thinBasic_VariableParse
     thinBasic_VariableParsePtr      thinBasic_VariableParsePtr
     thinBasic_VariablePtrToDirectPtr   thinBasic_VariablePtrToDirectPtr
     thinBasic_DirectPtrToDataPtr     thinBasic_DirectPtrToDataPtr
     thinBasic_VariableParseAndGetInfo   thinBasic_VariableParseAndGetInfo
    
     thinBasic_ParseVariableInfo      thinBasic_ParseVariableInfo
     thinBasic_ChangeVariableStringDirect thinBasic_ChangeVariableStringDirect
     thinBasic_ChangeVariableNumberDirect thinBasic_ChangeVariableNumberDirect
     thinBasic_ParseNumber         thinBasic_ParseNumber
     thinBasic_ParseLong          thinBasic_ParseLong
    ; thinBasic_Parse1NumberAndParens    thinBasic_Parse1NumberAndParens
    ; thinBasic_Parse2NumberAndParens    thinBasic_Parse2NumberAndParens
    ; thinBasic_Parse3NumberAndParens    thinBasic_Parse3NumberAndParens
    ; thinBasic_Parse4NumberAndParens    thinBasic_Parse4NumberAndParens
    ; thinBasic_Parse5NumberAndParens    thinBasic_Parse5NumberAndParens
    ; thinBasic_Parse6NumberAndParens    thinBasic_Parse6NumberAndParens
     thinBasic_Parse1Number        thinBasic_Parse1Number
    ; thinBasic_Parse2Number        thinBasic_Parse2Number
    ; thinBasic_Parse3Number        thinBasic_Parse3Number
    ; thinBasic_Parse4Number        thinBasic_Parse4Number
    ; thinBasic_Parse5Number        thinBasic_Parse5Number
    ; thinBasic_Parse6Number        thinBasic_Parse6Number
     thinBasic_ParseXNumbers        thinBasic_ParseXNumbers
     thinBasic_Parse1StringXNumbers    thinBasic_Parse1StringXNumbers
     thinBasic_Parse1String        thinBasic_Parse1String
     thinBasic_ParseString         thinBasic_ParseString
     thinBasic_CheckOpenParens       thinBasic_CheckOpenParens
     thinBasic_CheckOpenParens_Mandatory  thinBasic_CheckOpenParens_Mandatory
     thinBasic_CheckOpenParens_Optional  thinBasic_CheckOpenParens_Optional
     thinBasic_CheckCloseParens      thinBasic_CheckCloseParens
     thinBasic_CheckCloseParens_Mandatory thinBasic_CheckCloseParens_Mandatory
     thinBasic_CheckCloseParens_Optional  thinBasic_CheckCloseParens_Optional
     thinBasic_CheckComma         thinBasic_CheckComma
     thinBasic_CheckComma_Mandatory    thinBasic_CheckComma_Mandatory
     thinBasic_CheckComma_Optional     thinBasic_CheckComma_Optional
     thinBasic_DetermineType        thinBasic_DetermineType
     thinBasic_GetRunTimeInfo       thinBasic_GetRunTimeInfo
     thinBasic_GetLastError        thinBasic_GetLastError
     thinBasic_RunTimeError        thinBasic_RunTimeError
    )
    

  5. #15
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,795
    Rep Power
    10

    Re: FreeBasic SDK: extended data type

    Charles,

    attached the latest SDK for PowerBasic. I will start from this for creating new FreeBasic one.

    thinBasic_Parse2Number, thinBasic_Parse3Number, ... are missing an "s" at the end. They should be thinBasic_Parse2Numbers, thinBasic_Parse3Numbers, ...
    Functions ending with ..."AndParens" are now obsolete.

    Some functions inside thinCore.inc are new and will be present in next release. I will update all material very soon.

    Ciao
    Eros
    Attached Files Attached Files
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  6. #16

    Re: FreeBasic SDK: extended data type

    Thanks Eros,

    I've updated TOMDK and thinBasicOxygen.

    Below is the thinCore kit for FreeBasic I have been using - see how it compares with your latest


    Update posted further down

  7. #17
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,795
    Rep Power
    10

    Re: FreeBasic SDK: extended data type

    Thank you very much Charles. A much better version than mine.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  8. #18

    Re: FreeBasic SDK: extended data type

    The web pulsates with thinBasic updates this afternoon.

    I've just made one correction to thincore.bi and the DEF file parse1number instead of parse1numbers. This is reposted above.

    I have also included the machine code conversion EXT - DOUBLE Conversion lines in thincore.bi (commented).

    There is also a listing of all the exported function names present in thincore.dll.

    At some point we need to devise a standard test suite to exercise all the functions - do you have such a thing for PB that I could adapt for FB?


  9. #19
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,795
    Rep Power
    10

    Re: FreeBasic SDK: extended data type

    No I do not have a test but I'm preparing complete help material for all exported functions.
    Each function will report its meaning, syntax, how to use, where to use and for which language it is avaibale.
    I will start with PowerBasic and FreeBasic.

    Anyhow, inside \thinBasic\SampleScripts\Exe\ you can adapt ListExeImportExport.tBasic script to test exported function names.

    Ciao
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  10. #20
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,795
    Rep Power
    10

    Re: FreeBasic SDK: extended data type

    Quote Originally Posted by Charles Pegge
    I've just made one correction to thincore.bi and the DEF file parse1number instead of parse1numbers. This is reposted above.

    I have also included the machine code conversion EXT - DOUBLE Conversion lines in thincore.bi (commented).
    I cannot see those changes ???
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. ThinBasic extended numbers in FreeBASIC SDK.
    By D.J.Peters in forum thinBasic SDK
    Replies: 16
    Last Post: 15-05-2011, 00:27

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

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