Board index » delphi » Help on a simple repeat until loop
Har...@starnetinc.com (Harfst)
Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
|
Har...@starnetinc.com (Harfst)
Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Help on a simple repeat until loop
What is wronge with a loop like this
Repeat Thanks, |
Scott F. Earne
Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Help on a simple repeat until loopQuoteIn article <4e9llp$...@news.ais.net> Har...@starnetinc.com (Harfst) writes: specifically order of operations. Repeat THAT shoud work. Reason for problem. the AND gets evaluated before >. So Width > (0 AND Length) > 0; which obviously (IMHO) doesn't make sense. (0 AND Length) is valid, but Quote>Thanks, Scott F. Earnest / sc...@whiplash.res.cmu.edu | GO STEELERS! Pascal Nut / Die-hard STEELERS Fan! | '95-'96 NFL CHAMPIONS! ;-) |
Scott F. Earne
Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Help on a simple repeat until loopQuoteIn article <4ebrbm$...@news-f.iadfw.net> clifp...@airmail.net (CLIF PENN) writes: There's nothing wrong declaring a new variable called "length". And you can still access the original length procedure using the dot (".") operator. For example, this is perfectly valid: program override; const var begin Granted, this is a questionable practice, but it IS possible. Quote>[snip] Scott F. Earnest / sc...@whiplash.res.cmu.edu | GO STEELERS! Pascal Nut / Die-hard STEELERS Fan! | '95-'96 NFL CHAMPIONS! ;-) |
Van Tinkes
Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Help on a simple repeat until loopOn 26 Jan 1996, Harfst wrote: Quote> What is wronge with a loop like this expression evaluated in the right order: Until (Width > 0) AND (Length > 0); - Van Tinkess |
Claus Faerb
Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Help on a simple repeat until loopHarfst <Har...@starnetinc.com> wrote about Help on a simple repeat until loop in article <4e9llp$...@news.ais.net> of 26 Jan 96: Quote> What is wronge with a loop like this (( Width > 0 ) AND Length ) >0 To get what you want, you have to write: Claus ------------------------------------------------------------------------ |
Delta R
Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Help on a simple repeat until loopHYa... All, Friday January 26 1996 05:35, Harfst wrote to All: H> From: Har...@starnetinc.com (Harfst) H> What is wronge with a loop like this H> Repeat Until (Width>0) AND (Length>0); H> Thanks, Zya nxt time.... Delta Ray ############################### ... Success is one unpardonable sin against one's fellows. |
Michael Browni
Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Help on a simple repeat until loopQuoteIn article <4e9llp$...@news.ais.net> Har...@starnetinc.com (Harfst) writes: Until (Width > 0) AND (Length > 0); |
Sheldon Shall
Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Help on a simple repeat until loopIn a previous article, Har...@starnetinc.com (Harfst) says: Quote>What is wronge with a loop like this Until (Width = 0) and (Length = 0) -- |
Barros De
Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Help on a simple repeat until loopQuoteSheldon Shallon (ad...@lafn.org) wrote: : In a previous article, Har...@starnetinc.com (Harfst) says: : : >What is wronge with a loop like this : > : >Repeat : > Writeln('Enter width and length'); : > Readln(Width, Length); : >Until Width > 0 AND Length > 0; : > : : You probably want the last line to read : Until (Width = 0) and (Length = 0) : Sheldon, I believe the problem he was having had to due with the lack of brackets: until (Width>0) and (Length>0);. My guess is he was trying to avoid zero input values. Later, Luis |
Chri
Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:Help on a simple repeat until loopIn article <1996Feb3.183942.15...@lafn.org>, ad...@lafn.org says... Quote
Until (Width>0) and (Length >0); Chris. |