Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Nested UDT (2: continue)

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

    Nested UDT (2: continue)

    For those that followed previous thread about UDT here, this is the continuation thread (previous one was too long and all topic covered there are already present in current thinBasic preview version 1.5.0.1).

    Ok, here we are again with something new in UDT parsing.
    Please find here attached an UNDER DEVELOPMENT version of thinCore.dll plus a test script that show current state of the art UDT parsing in thinBasic. I was able to add parsing of arrays of UDT and arrays inside UDT structures. There are not logical limits to how arrays of UDTs and arrays inside UDTs can be arranged. Parsing will recursively tokenize structures comparing with TYPE declaration.

    This is a test version, so do not use for real scripts for the moment. I've made a lot of tests but as you know, testing is never enough so I expect you will find some uncovered cases.

    Let me know.
    Ciao
    Eros

    UPDATED:
    2007.11.20
    • VARPTR now working with UDT inside UDT or any UDT element at any level. See included example.
    • SizeOf is now able to determine correct size of any element and sub element of any UDT or nested UDT. See included examples
    • attached file removed. All features present in current thinBasic version

    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

  2. #2
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: Nested UDT (2: continue)

    Eros, thanks as you know I have been dreaming about having these features. I will start to test things in coming weeks. Thanks for bringing this feature to us!
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

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

    Re: Nested UDT (2: continue)

    Perfect Eros,

    thanks a lot! Works great here so far!


    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

  4. #4

    Re: Nested UDT (2: continue)

    Man,

    I can't wait till I can work on my computer again. Thanks Eros.

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

    Re: Nested UDT (2: continue)

    Just to let you know ... there are still items to be solved. For example (not exaustive list):

    • an UDT inside an UDT cannot be passed as function parameter
    • VARPTR is not able to return the exact memory position of an UDT inside an UDT
    • SIZEOF function to work also on UDT elements and nested UDT
    • UBOUND function to work on UDT elements and nested DLL too
    • ...


    There are other situations to check but I will be more precise in future posts.

    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

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

    Re: Nested UDT (2: continue)

    Attached file in first post of this thread updated.
    VARPTR now working with UDT inside UDT or any UDT element at any level. See included example.


    I will now work on passing any element or any nested UDT as FUNCTION parameter BYREF.

    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

  7. #7
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: Nested UDT (2: continue)

    Thanks Eros for tremendous task you undertook to bring us these features, looks like you are really getting it done in great Eros Fashion!
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

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

    Re: Nested UDT (2: continue)

    Thanks Ken.

    It is a bit complex task this one but I'm sure it is myself making too much complex.
    I'm discovering that I repeated the same code more then once so I'm confident I will be able to simplify UDT handling a lot and this will bring more easy to be maintained code for future implementations.

    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

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

    Re: Nested UDT (2: continue)

    Attachment in first post of this thread updated.

    SizeOf function is now able to determine correct size of any element and sub element of any UDT or nested UDT.
    See included examples.

    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

  10. #10
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: Nested UDT (2: continue)

    All 3 sample files ran fine, thanks Eros!
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

Page 1 of 2 12 LastLast

Similar Threads

  1. Should PC Action Center Continue?
    By gamegamer in forum Shout Box Area
    Replies: 0
    Last Post: 30-09-2010, 23:43

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
  •