Results 1 to 10 of 22

Thread: Variable scope suggestion

Threaded View

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

    Question Variable scope suggestion

    Hi,

    Currently and according to the documentation, for a given variable there can be :

    • Local scope inside a sub or function,
    • Global scope inside a script,

    to the extent of my knowing and at this stage of thinBasic developpement, there can't be an Include scope
    which could be useful when splitting a script into reusable/shareable parts between projects
    and assuring there will be no variable-name conflict.

    Actual workaround is to manually prefix each variable to make distinction.

    Same idea for subs/functions ?


    Your opinion ?
    Last edited by DirectuX; 20-11-2018 at 09:13.
    ThinBasic 1.11.6.0 ALPHA - Windows 8.1 x64

Similar Threads

  1. Suggestion: new for commands
    By kryton9 in forum Suggestions/Ideas discussions
    Replies: 7
    Last Post: 16-05-2017, 19:15
  2. One suggestion
    By Petr Schreiber in forum MSVC++ 6.0
    Replies: 3
    Last Post: 13-01-2006, 13:51

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
  •