Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Why can't I use the loop?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Gadd




PostPosted: Sun Apr 08, 2012 6:23 pm   Post subject: Why can't I use the loop?

Hey guys, I was helping someone out with screen adjustment here on the forum and I saw they had a loop, I wanted to solve the problem so I then did and used a loop as well. For some odd reason thought the loop would
not follow through and the program wont run with the loop. The problem is not being able to run the program because when I take the loop away it works perfectly fine, but I was wondering why the program never runs when I
use a loop.

Turing:


setscreen ("graphics:max;max")

loop
    if (maxx > 1500) then
        setscreen ("graphics:500;max")
        if (maxy > 900) then
            setscreen ("graphics:max;500")
        end if
    end if
end loop

put "!"


Thanks, btw I know that it's pointless to use the loop when it really only needs to do 1 count to check the graphics settings, Im just wondering why it didnt at least crash or something along those lines.
Sponsor
Sponsor
Sponsor
sponsor
Dreadnought




PostPosted: Sun Apr 08, 2012 8:01 pm   Post subject: Re: Why can't I use the loop?

The program runs, try adding a put command in your loop, you'll see that its working fine. I assume you are puzzled that the program never opened a window, that's because the window is generally hidden until you send output to it.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: