Results 1 to 7 of 7

Thread: thinBasic_GetTokenType ???

  1. #1
    Junior Member
    Join Date
    Jun 2005
    Posts
    20
    Rep Power
    22

    thinBasic_GetTokenType ???

    Eros,

    First of all, thanks kindly for your invite to this forum!

    I am putting some finishing touches on a DAO library and I had a couple of questions:

    1. Is there any way to decipher what a given parameter token variable type is?
    If the script function call passes an array of n elements, can I tell whether
    the array is of numeric or string type before I work with the array elements?

    2. Is there a way for one user module to access the functionality of another? For instance, I could find a use for some Linked List routines without having to embed it again in the DAO lib.

    3. Do you have a preference for user module symbol/equate naming conventions?


    Regards,

    John

  2. #2

    thinBasic_GetTokenType ???

    Hi John,

    2. Is there a way for one user module to access the functionality of another?
    Yes there is a way, but for now we make it only for the ThinBASIC_DT.DLL
    This module exports the GetFuncAddress function that works like the WIN32 API GetProcAddress.
    However GetFuncAddress is an undocumented function, we should still decide how to do.

    Regards,
    Roberto
    http://www.thinbasic.com

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

    thinBasic_GetTokenType ???

    Hi John,

    Quote Originally Posted by Reinking
    First of all, thanks kindly for your invite to this forum!
    you are welcome. We are also preparing a static and dynamic library for users using MS C/C++ compilers

    Quote Originally Posted by Reinking
    1. Is there any way to decipher what a given parameter token variable type is?
    If the script function call passes an array of n elements, can I tell whether
    the array is of numeric or string type before I work with the array elements?
    Currently not, sorry. But next release will have more function interface especially working on arrays. I will add a type checking but in next release.

    Quote Originally Posted by Reinking
    2. Is there a way for one user module to access the functionality of another? For instance, I could find a use for some Linked List routines without having to embed it again in the DAO lib.
    As Roberto stated, yes there is a way but at the moment we consider it as reserved. There is an exported "GetFuncAddress" function in thinBasic.DT.DLL that will return a codeptr of the requested function passed as function ID. We think to implement it also in other modules but not in immediate future release. We are still testing it.

    Quote Originally Posted by Reinking
    3. Do you have a preference for user module symbol/equate naming conventions?
    We prefer to work in this way:
    [list][*]regarding Function names, use a prefix equal to the module name followed by underscore, followed by your function name. For example, if you call your module JRDAO, use the following: JRDAO_Get... JRDAO_Set...[*]regarding equates, if the equate is a standard one under Windows programming, possibily use the same name following Power Basic WIN32API.INC declaration. Even if the same equate can be included in multiple modules loaded at the same time by the script, the first module declaring the equate will have higher priority and this will not create any problem if the value of the equate is the same all over multiple modules.

    If the equate is a personalized one not a standard windows API one, use the same logic as for function names: %JRDAO_MyEquateNumber, $JRDAO_MyString or whatever.[/list:u]
    If you agree on this way of working, I will put this into interface documentation. So thanks for asking, quite important question in order to keep development congruent.

    Next thinBasic version should be ready by the end of the week. I'm having some GPF in module interface due to introduction of new functionalities into UI module. I hope to solve them quickly

    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

  4. #4
    Junior Member
    Join Date
    Jun 2005
    Posts
    20
    Rep Power
    22

    thinBasic_GetTokenType ???

    Thanks for the information!

    I'm implementing a GetRows method within the DAO library.
    My first thought was to return a tab delimited string of fields per string array element. My second thought was to return a pointer to the record and let the Dll handle the storage. I'm still flip-flopping on the choice, but your responses show what I can and can't do at the moment.

    Regards,
    John

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

    thinBasic_GetTokenType ???

    John,

    I've introduced some new functionalities you may be interested.
    You have to use thinBasic 1.0.8.2 in order to be able to use them.

    Let me know if any problem.
    Regards
    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

  6. #6
    Junior Member
    Join Date
    Jun 2005
    Posts
    20
    Rep Power
    22

    thinBasic_GetTokenType ???

    Eros,

    I've been distracted on another project and unfortunately haven't had as much time to visit here lately. I will have a look!

    Regards,

    John

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

    thinBasic_GetTokenType ???

    Take your time, John
    It is one of the most precious thing we have.

    Let me know if you need some exaplanation (no much documentation for new functions for the moment). Also consider we are changing return types of functions adding a more complete numeric type so there will be the following types (see below). If you have developed a module, you will just need to recompile with new thinCore.INC file.

    I will let you know when.

    Ciao
    Eros


    %thinBasic_ReturnNone             =  0& 
    %thinBasic_ReturnNumber           = 20& 
    %thinBasic_ReturnString           = 30& 
                                           
    %thinBasic_ReturnCodeByte         =  1&
    %thinBasic_ReturnCodeInteger      =  2&
    %thinBasic_ReturnCodeWord         =  3&
    %thinBasic_ReturnCodeDWord        =  4&
    %thinBasic_ReturnCodeLong         =  5&
    %thinBasic_ReturnCodeQuad         =  6&
    %thinBasic_ReturnCodeSingle       =  7&
    %thinBasic_ReturnCodeDouble       =  8&
    %thinBasic_ReturnCodeCurrency     =  9&
    %thinBasic_ReturnCodeExt          = 10&
    
    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

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
  •