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
    50
    Posts
    8,187
    Blog Entries
    2
    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/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

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

    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
    6,796
    Blog Entries
    3
    Rep Power
    693

    Re: Nested UDT (2: continue)

    Perfect Eros,

    thanks a lot! Works great here so far!


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 7 64bit - Intel Core 2 Duo T6600 @ 2.2GHz - 4 GB RAM - NVIDIA GeForce G210M 512MB
    Windows 8 64bit - Intel Core i5-3350P @ 3.1GHz - 8 GB RAM - NVIDIA GeForce GT640 3GB

  4. #4
    thinBasic MVPs Michael Hartlef's Avatar
    Join Date
    Sep 2006
    Location
    Leverkusen, Germany
    Age
    51
    Posts
    3,278
    Blog Entries
    2
    Rep Power
    339

    Re: Nested UDT (2: continue)

    Man,

    I can't wait till I can work on my computer again. Thanks Eros.
    Running Windows 7 Home, 64 bit, 8 GB ram, Athlon II X2 255, ATI Radeon HD 4200.

  5. #5
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    50
    Posts
    8,187
    Blog Entries
    2
    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/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  6. #6
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    50
    Posts
    8,187
    Blog Entries
    2
    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/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

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

    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
    50
    Posts
    8,187
    Blog Entries
    2
    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/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  9. #9
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    50
    Posts
    8,187
    Blog Entries
    2
    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/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

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

    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

Posting Permissions

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