Results 1 to 7 of 7

Thread: UDT_VarPtr.tbasic

  1. #1
    Member DirectuX's Avatar
    Join Date
    Oct 2018
    Location
    France
    Posts
    417
    Rep Power
    55

    Exclamation UDT_VarPtr.tbasic

    Hi, .

    successful running of UDT_VarPtr.tbasic requires to add parenthesis around the wStarsSection function's parameter.

    • If these parenthesis are mandatory :
      1. there is that sample script to correct (I can post the corrected file, though there are only 6 parenthesis to add.)
      2. It is not obvious in thinbasic's help that parenthesis are mandatory or not (from my point of view)
    • If parenthesis are not mandatory, (I think it is not, because for others function calls it works ok) then thinbasic misinterpret a call without parenthesis to a function for which parameters are optional.
    • In both case, behaviour is not consistent.


    Note:not sure if this thread goes here or in thinbasic core's forum
    ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64

  2. #2
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,153
    Rep Power
    736
    Thanks for reporting it!


    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

  3. #3
    Member DirectuX's Avatar
    Join Date
    Oct 2018
    Location
    France
    Posts
    417
    Rep Power
    55

    Question

    Hi Petr,

    don't mention it,

    yet, could you please tell the intended behaviour ?
    ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64

  4. #4
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,153
    Rep Power
    736
    We will think with Eros how to address documentation update.

    Fact is thinBasic design is not consistent across the modules, regarding the use of brackets.

    This is partially caused by the freedom programmer has when creating thinBasic module. There are separate thinBasic_CheckOpenParens_Mandatory, thinBasic_CheckOpenParens_Optional, thinBasic_CheckCloseParens_Mandatory, thinBasic_CheckCloseParens_Optional, which allow to design function requiring, allowing or preventing the use of brackets.

    The action point for this would be to correct the example and be clear in help file.

    I will notify Eros about this, so he can address it in the next release.


    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

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

    thanks for reporting the problem. It is a bug!
    Adding parenthesis just bypass the problem but in reality it is a bug in reading functions parameters when ALL parameters of a function are optional like in wStartSection function.
    I wrote UDT_VarPtr.tbasic in 2011 and after that time optional parameters parsing changed so many times.

    I will fix in next update.

    Petr reply regarding freedom to develop thinBasic internal functions in Core engine and external modules is true. One can decide () are optional or decide the other way round.
    This freedom can be a problem and a feature at the same time.

    Thanks again.
    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
    Member DirectuX's Avatar
    Join Date
    Oct 2018
    Location
    France
    Posts
    417
    Rep Power
    55
    Hi,

    Eros, you're welcome.

    I reported more things in the support part of the website (though the correct version cannot be selected)
    ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64

  7. #7
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,817
    Rep Power
    10
    Yes, thanks.
    I will go through them all in next days.

    Just relaxing after a high load period at work.
    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

Similar Threads

  1. difference between .tbasic and .tbasicc
    By sandyrepope in forum Console
    Replies: 5
    Last Post: 30-08-2024, 16:49
  2. ListView_Basic.tBasic
    By DirectuX in forum Samples for help file
    Replies: 2
    Last Post: 04-11-2018, 11:47
  3. ML_ExpressionEvaluation.tbasic
    By DirectuX in forum Samples for help file
    Replies: 1
    Last Post: 01-11-2018, 14:00
  4. Passing Arguments To Tbasic Program
    By peralta_mike in forum Core module
    Replies: 4
    Last Post: 03-11-2011, 19:12
  5. Invoking One .tbasic Program From Another .tbasic Program
    By gungadout in forum thinBasic General
    Replies: 46
    Last Post: 23-11-2009, 12:01

Members who have read this thread: 0

There are no members to list at the moment.

Tags for this Thread

Posting Permissions

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