This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-03-14 14:09:50

monicap
New Scratcher
Registered: 2012-03-09
Posts: 3

Infinite, finite and conditional loop??

Hey guys
I have to do this paper on what an infinite, finite and conditional loop is, but I have no idea, can you please help me? (my paper is due today!)
Thanks  smile

Offline

 

#2 2012-03-14 14:14:53

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: Infinite, finite and conditional loop??

This post of scimonster's probably explains it better than I ever could  smile


Why

Offline

 

#3 2012-03-14 14:15:28

ProgramCAT
Scratcher
Registered: 2011-12-13
Posts: 500+

Re: Infinite, finite and conditional loop??

An infinite loop is one which repeats forever.
A finite loop is one which repeats for a set amount of times.
A conditional loop is one that repeats until a condition (eg healthlevel < 1) is true or false.


Programming is an art...
Goodbye, Scratch. I am leaving because of the exams coming up at our school, though I'll check the forums once or twice a week.

Offline

 

#4 2012-03-14 16:45:37

turkey3
Scratcher
Registered: 2011-12-04
Posts: 500+

Re: Infinite, finite and conditional loop??

ProgramCAT wrote:

An infinite loop is one which repeats forever.
A finite loop is one which repeats for a set amount of times.
A conditional loop is one that repeats until a condition (eg healthlevel < 1) is true or false.

Yes!

Offline

 

#5 2012-03-14 19:06:50

trinary
Scratcher
Registered: 2012-01-29
Posts: 1000+

Re: Infinite, finite and conditional loop??

turkey3 wrote:

ProgramCAT wrote:

An infinite loop is one which repeats forever.
A finite loop is one which repeats for a set amount of times.
A conditional loop is one that repeats until a condition (eg healthlevel < 1) is true or false.

Yes!

Yet another spam-like post of this kind by you.


http://trinary.tk/images/signature_.php

Offline

 

#6 2012-03-15 04:54:00

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Infinite, finite and conditional loop??

Of course, an infinite loop can be faked by a conditional loop whose condition never allows it to stop (repeat until false or while true). Also, loops can be atomic, which means is evaluates it all then displays, or nonatomic, which means it displays after each run. Scratch uses nonatomic, which allows an infinite loop. However, if you use something like JavaScript, you'll find while(true) will crash your browser.  tongue


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#7 2012-03-15 16:40:07

ImagineIt
Scratcher
Registered: 2011-02-28
Posts: 1000+

Re: Infinite, finite and conditional loop??

trinary wrote:

turkey3 wrote:

ProgramCAT wrote:

An infinite loop is one which repeats forever.
A finite loop is one which repeats for a set amount of times.
A conditional loop is one that repeats until a condition (eg healthlevel < 1) is true or false.

Yes!

Yet another spam-like post of this kind by you.

That's not really spam. It's saying that ProgramCAT's post is true.(It is by the way.)

Last edited by ImagineIt (2012-03-15 16:40:31)

Offline

 

#8 2012-03-15 22:39:46

trinary
Scratcher
Registered: 2012-01-29
Posts: 1000+

Re: Infinite, finite and conditional loop??

ImagineIt wrote:

trinary wrote:

turkey3 wrote:


Yes!

Yet another spam-like post of this kind by you.

That's not really spam. It's saying that ProgramCAT's post is true.(It is by the way.)

It's just that I've seen at least 12 very similar posts by turkey3 on other such threads, 'agreeing' to posts but not contributing any information.


http://trinary.tk/images/signature_.php

Offline

 

#9 2012-03-16 16:20:32

BoltBait
Scratcher
Registered: 2009-03-09
Posts: 1000+

Re: Infinite, finite and conditional loop??

Infinite Loop:

forever
  go to [mouse-pointer v]
end
Conditional Loop:

repeat until <(timer) > [10]>
  go to [mouse-pointer v]
end
Finite Loop:

repeat [10] 
  go to [mouse-pointer v]
end

Last edited by BoltBait (2012-03-16 16:22:07)


Animated sigs must be banned!
http://boltbait.com/j.pnghttp://boltbait.com/s.pnghttp://boltbait.com/d.pnghttp://boltbait.com/a.pnghttp://boltbait.com/p.png

Offline

 

Board footer