Results 1 to 3 of 3

Thread: unique udt-variables

  1. #1
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,529
    Rep Power
    170

    unique udt-variables

    very short:
    I want to have global udt-variables that are unique of a kind as currently:
    Type tmyUDT
      propertyX As Byte
      Function _Create()
      '...initialize...
      End Function
    End Type
    Global myUDT As tmyUDT
    
    imagine like this:
    Type Unique myUDT
      propertyX As Byte
      Function _Create()
      '...initialize...
      End Function
    End Type
    ' myUDT is a global variable now already.
    ' no array possible
    ' no other variable of same type shall exist
    ' none shall Extends it
    
    keyword UNIQUE already available for ARRAY-functions,

    also thinkeable syntax:

    Type myUDT [Global |] Unique
    
    reason & purpose for this:
    script-unit-types, enumerations, really unique globals as TBGL_Window, Mouse, Keyboard etc.
    Last edited by ReneMiner; 13-02-2016 at 11:02.
    I think there are missing some Forum-sections as beta-testing and support

  2. #2
    This is possible in Oxygen, which allows static properties and methods to be accessed using the class name, without requiring an instantiation:

    class vv
      static float x,y,z
      method show
      print x
      end method
    end class
    
    vv.x=34
    print vv.x 'property
    vv.show    'method
    

  3. #3
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,529
    Rep Power
    170
    in thinBasic a problem currently would be having static udt-subelements that are not of primitive numeric type but other udts or dynamic strings i guess.

    ______________________________________________________

    Unique Needed Individual Type :

    Unit Keyboard
      ' all values & methods that belong to keyboard 
      ' accessible via Global 
      ' Keyboard.<property>
      ' and within Unit : Me.<property> : End Unit
      ' ...
    End Unit
    
    Last edited by ReneMiner; 13-02-2016 at 14:53.
    I think there are missing some Forum-sections as beta-testing and support

Similar Threads

  1. Do you know: Logical variables
    By ErosOlmi in forum Do you know ...
    Replies: 1
    Last Post: 06-05-2011, 17:27
  2. Naming Variables
    By danbaron in forum Fixed or cleared errors in help material
    Replies: 2
    Last Post: 08-10-2010, 06:32
  3. Global Variables
    By safe60 in forum C/C++ language SDK development
    Replies: 7
    Last Post: 22-09-2008, 14:06
  4. Do you know: STATIC variables
    By ErosOlmi in forum Do you know ...
    Replies: 5
    Last Post: 05-08-2008, 11:03

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
  •