Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: thinBasic 1.9.xx vaporware

  1. #11
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Quote Originally Posted by ReneMiner View Post
    and "object" as alias of "type" ?
    I think I have other ideas for "object" keyword.
    It is regarding native COM handling.
    But it's too premature at the moment to talk about that
    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. #12
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    I love how ThinBASIC exposes SelectExpression for Select statement.

    It would be great to follow this innovative pattern, and have Iteration available inside Foreach.

    Imagine this:
    long items(5)
    for each item in items
      item = 2 ^ Iteration
    next
    
    ' -- Now array contains 2, 4, 8, 16, 32
    
    We could expand further and add IterationBegins and IterationEnds. Useful in cases like:
    long items(5) = 1, 2, 3, 4, 5
    string myText
    for each item in items
      myText += item + iif$(not IterationEnds, ",", "")
    next
    
    ' Produces: myText = "1,2,3,4,5"
    
    The Iteration* helpers would always reflect the current nesting level, so it would work even for nested cycles.

    (this would be handy for classic for too).


    Petr
    Last edited by Petr Schreiber; 14-01-2015 at 20:10.
    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. #13
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,527
    Rep Power
    170
    the "iterations-counter" within for-next (also classic) is a good suggest. It can help avoid a lot of calculation within the loop and also can tell the current array-elements index in For Each (assumed it's a 1-dimensional, 1-based array).

    There is already a keyword "Iterate" used together with "For" only- as far as i'm aware of it. Perhaps could simply combine it with other keywords:

    For whatever In|To dontCare
    
    If Iterate Begin Then
    ' first cycle
    ElseIf Iterate End Then 
    ' last cycle
    Else
      PrintL Iterate Value  ' current cycle-number/index
      Iterate For 'skip cycle
    Endif
    '...
    Next
    
    Last edited by ReneMiner; 15-01-2015 at 13:32.
    I think there are missing some Forum-sections as beta-testing and support

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Vaporware: what will come after 1.7...
    By ErosOlmi in forum thinBasic vaporware
    Replies: 11
    Last Post: 09-12-2008, 08:37
  2. WMI module: some preview vaporware
    By ErosOlmi in forum WMI
    Replies: 10
    Last Post: 15-10-2007, 16:33
  3. Another new vaporware: multiline strings
    By ErosOlmi in forum thinBasic vaporware
    Replies: 7
    Last Post: 08-10-2007, 16:00
  4. Replies: 25
    Last Post: 20-09-2007, 17:57
  5. My word count program is vaporware
    By sandyrepope in forum thinBasic General
    Replies: 17
    Last Post: 31-05-2007, 20:04

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
  •