Results 1 to 8 of 8

Thread: Suggestion: new for commands

Threaded View

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

    Suggestion: new FOR commands

    Easier to explain via an example. In C++ they do this:
    for ( int i = 0; i < limit; i++ )

    What is neat is that i is local for that loop. Right now we need to declare i outside of the loop as they do in C and it is not local

    The idea, 6 new commands:
    Fori, Forj, Fork, fFori , fForj, fFork each used with an optional stepType (boolean false or true) as following:

    optional stepType not used, steps in normal manner or as "false" was passed in.
    Fori 1, 10, 2

    In TB:
    long i
    for i = 1 to 10 step 2


    fFori 0.1, 0.9, 5, true

    in TB:
    single i
    for i = 0.1 to 0.9 step (0.9 - 0.1)/5
    Last edited by kryton9; 14-05-2017 at 21:46.
    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

Similar Threads

  1. Experimental commands: GRAPHIC
    By ErosOlmi in forum thinBasic vaporware
    Replies: 3
    Last Post: 12-12-2007, 00:14

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
  •