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

Username:   Password: 
 RegisterRegister   
 Loop in a Loop!! Urgent!!!!!!!!!
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Krocker




PostPosted: Wed Dec 15, 2010 9:35 am   Post subject: Loop in a Loop!! Urgent!!!!!!!!!

Is it possible to have a loop in a loop in a loop? Cuz i have a program where i need the loops. is it possible?
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: Wed Dec 15, 2010 10:13 am   Post subject: RE:Loop in a Loop!! Urgent!!!!!!!!!

Why don't you try it?
Krocker




PostPosted: Wed Dec 15, 2010 5:41 pm   Post subject: RE:Loop in a Loop!! Urgent!!!!!!!!!

well, that an answer.
Insectoid




PostPosted: Wed Dec 15, 2010 6:28 pm   Post subject: RE:Loop in a Loop!! Urgent!!!!!!!!!

Did you try it?
TokenHerbz




PostPosted: Wed Dec 15, 2010 7:57 pm   Post subject: RE:Loop in a Loop!! Urgent!!!!!!!!!

Turing:

var c : int := 0
loop
    put "THIS is loop one"
    loop
        put "This Is Loop Two"
        loop
            put "this is loop THREE"
            c += 1
            exit when c mod 2 = 0
        end loop
        exit
    end loop
    exit when c >= 10
end loop
put "What a mess of loooops"
Insectoid




PostPosted: Wed Dec 15, 2010 8:08 pm   Post subject: RE:Loop in a Loop!! Urgent!!!!!!!!!

Damnit Token! Stop rewarding laziness!

Although in this case laziness is more work than initiativity.
Krocker




PostPosted: Thu Dec 16, 2010 9:44 am   Post subject: RE:Loop in a Loop!! Urgent!!!!!!!!!

im not lazy Insetoid, i just cant check because my program uses parallel ports, which my computer does not have. so i cannot run the program. My school have the old computers, so ya. SO im not LAZY.
Insectoid




PostPosted: Thu Dec 16, 2010 9:47 am   Post subject: RE:Loop in a Loop!! Urgent!!!!!!!!!

You could make a new program. It's not that hard.
Sponsor
Sponsor
Sponsor
sponsor
Krocker




PostPosted: Thu Dec 16, 2010 11:17 am   Post subject: RE:Loop in a Loop!! Urgent!!!!!!!!!

a new 300k line program. ya thanx, but no thx, ill stick with posting questions. lol
TokenHerbz




PostPosted: Thu Dec 16, 2010 11:35 am   Post subject: RE:Loop in a Loop!! Urgent!!!!!!!!!

it doesn't take 300 lines of code to test small programming features... or to test most things to see if it works how it should.

Most the time i prefer to test ideas outside my main program before implementing it into my source. I find things are less problematic and i learn a lot more.

code:

loop
    put "loop 1"
    loop
          put "loop 2"
          exit
    end loop
    Input.Pause
end loop


this 8 line small code tests a loop inside a loop. This Doesn't require a massive 300 lines of code.
Krocker




PostPosted: Thu Dec 16, 2010 11:52 am   Post subject: RE:Loop in a Loop!! Urgent!!!!!!!!!

lol, k, im new to the whole thing, so ya, ill try that next time. thx anyways
DemonWasp




PostPosted: Thu Dec 16, 2010 12:10 pm   Post subject: RE:Loop in a Loop!! Urgent!!!!!!!!!

Wait. Did you just suggest that you have a program with 300K lines of code? Does Turing even start up with a file that large?
Insectoid




PostPosted: Thu Dec 16, 2010 12:15 pm   Post subject: RE:Loop in a Loop!! Urgent!!!!!!!!!

That's not a program. That's an executable novel.
DemonWasp




PostPosted: Thu Dec 16, 2010 12:17 pm   Post subject: RE:Loop in a Loop!! Urgent!!!!!!!!!

At 300,000 lines, assuming a generous 100 lines per page, that's still 3000 pages. That's not a novel, that's a whole series...assuming you're not Robert Jordan, in which case that's a book and a half.
Insectoid




PostPosted: Thu Dec 16, 2010 12:24 pm   Post subject: RE:Loop in a Loop!! Urgent!!!!!!!!!

I would love to see someone write 300,000 lines of code just to test nested loops.

Brb, writing a program to write a 150,000 loop program to see what happens.
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 2  [ 22 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: