Results 1 to 2 of 2

Thread: Repeat or loop

  1. #1

    Repeat or loop

    G'day I was wondering if any one here could show me a good example how to loop or reapt some fucntion

    Like sleep 10 msg....

    then loop that if it ends and start over at the start any help would be great

    Thanks kind regards Henry

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

    Re: Repeat or loop

    Hi Henry,

    if I understand your question, you want some thinBASIC code which allows loops ?

    In thinBASIC there are many possiblities to achieve this.

    For fixed number of iterations, FOR/NEXT is the best:
    [code=thinbasic]
    DIM i AS LONG ' -- counter

    FOR i = 1 TO 10
    MSGBOX 0, "Iteration"+STR$(i)
    NEXT
    [/code]

    For conditional loops please check example in thinBASIC helpfile under topic "thinBASIC language"\"Program flow"\"DO/LOOP"


    Bye,
    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

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
  •