Page 3 of 3 FirstFirst 123
Results 21 to 24 of 24

Thread: Signs of life out there!

  1. #21
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,530
    Rep Power
    171
    we had this already: variable_exists gives correct result only on first call. If Me was dimensioned once then Variable_Exists results true, no matter if defined in current call or in a call before. So this works as long as the function gets called the MeHack_CallFunction-way only.
    Also I can not see any parameters that could be passed to myType.func() in the example - so the approach I took here was more advanced already.

    It still requires to insert the same part of code (If something then Dim ..As ... At..) to each and every type-function while the type is "known" anyway to the function since it is its "parent" and also to find as String in the functions name before the dot.

    If the call is not made from a variable as usual, ME is not dimensioned inside the function anyway -

    There are two ways to call a type-function thinkeable:

    -one possibility is to call a special Delegate-Function that would create a local overlay at pData and then call the function on it the regular call-a-type-function through a variable-way, but the problems would be to compose the functions name for the final call from a local variables name and from a string that was passed to delegate. The other problem would be to hand-over the parameters from our actual call to "Delegate" to the finally called Type-function. Both can not be done from tB-scripts currently.

    -second possibility would be, to tell type-functions WHERE to find Me -which is probably already the case- and optional TypeOf(Me) if the variables pattern can not be copied from the calling variable. It could as well be taken from the functions name or from the internal stored type-definition where that
    Alias STATIC As "type.function Ptr"
    
    is a part of - means a function of a type is in reality just a static variable containing the functions pointer, common to all elements and/or variables of that type

    - but all that has to be done very deep inside core...
    Last edited by ReneMiner; 24-05-2014 at 11:56.
    I think there are missing some Forum-sections as beta-testing and support

  2. #22
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Hi Rene,

    well, you are right it does not solve problem (this is what I write in my post too ), but I managed to identify possible concrete point for improvement - addition of new (optional) parameter to SDK function.

    To make it work like we need, one change needs to be made to thinBasic_FunctionCall_ByPtr - optional ME pointer.
    This would provide low level backend, which could be used by syntactic sugar in language itself.

    No need for typeOf in this case - thinBasic engine already knows the type for <type>.<functionName> functions.


    Petr
    Last edited by Petr Schreiber; 24-05-2014 at 13:51.
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  3. #23
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,530
    Rep Power
    171
    still hoping for a miracle
    I think there are missing some Forum-sections as beta-testing and support

  4. #24
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Hi Rene,

    I was looking into this, but I can't do much about it at the moment - my knowledge in this area is limited.

    In case I run into case like this (waiting for feature xy), I tend to create high level layer which will have not nice but working implementation inside, and will replace it with proper functionality once available.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

Page 3 of 3 FirstFirst 123

Similar Threads

  1. Life 3D alfa
    By RobbeK in forum TBGL General
    Replies: 10
    Last Post: 09-11-2013, 00:22
  2. Signs that you're a bad programmer
    By ErosOlmi in forum Development
    Replies: 5
    Last Post: 04-11-2011, 17:47
  3. Second Life
    By Charles Pegge in forum Shout Box Area
    Replies: 11
    Last Post: 15-02-2011, 00:31
  4. my life with c++
    By kryton9 in forum C / C++
    Replies: 4
    Last Post: 13-06-2010, 05:00
  5. Journey of Life
    By Charles Pegge in forum Shout Box Area
    Replies: 1
    Last Post: 27-03-2010, 00:56

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
  •