Re: nested ifs

2006-01-26 Thread Dennis Brown
, my nested ifs would always work. The problem is that the compiler allows too many forms, and mixing of forms. The compiler does not prioritize by form type which can lead to not always accepting a valid form. Example 1 below is a valid form. Example 2 would be mixing two forms in the same

Re: nested ifs

2006-01-26 Thread Rob Cozens
Hi Chipp, I like to do the following: if tResult is Error then answer Go Ahead anyway with Cancel or OK if it is Cancel then exit to top end if Most of the time it compiles, but sometimes the single line if statement in the middle throws and error and won't compile I, like others, have

Re: nested ifs -- indentation

2006-01-26 Thread Erik Hansen
--- Stephen Barncard [EMAIL PROTECTED] wrote: Chipp, I use that form all the time (if it is empty then exit to top) - I just had a problem regarding dangling THENs.. IF condition THEN command -- indented END IF IF condition THEN command -- not indented some like it indented. Erik

nested ifs

2006-01-25 Thread Chipp Walters
I like to do the following: if tResult is Error then answer Go Ahead anyway with Cancel or OK if it is Cancel then exit to top end if Most of the time it compiles, but sometimes the single line if statement in the middle throws and error and won't compile, so I'm forced to do: if tResult

Re: nested ifs

2006-01-25 Thread Eric Chatonet
Hi Chipp, I noticed that too. The compiler seems to be confused but should not... Systematically, I never use a single line conditional statement before an else or an end if to avoid problems. Adding a line between (even a blank one) makes the problem vanish :-) Best Regards from Paris, Eric

Re: nested ifs

2006-01-25 Thread simplsol
compiles. Paul Looney -Original Message- From: Chipp Walters [EMAIL PROTECTED] To: Use-Revolution use-revolution@lists.runrev.com Sent: Wed, 25 Jan 2006 04:32:53 -0600 Subject: nested ifs I like to do the following:    if tResult is Error then    answer Go Ahead anyway with Cancel or OK

Re: nested ifs

2006-01-25 Thread Dave Cragg
On 25 Jan 2006, at 10:32, Chipp Walters wrote: I like to do the following: if tResult is Error then answer Go Ahead anyway with Cancel or OK if it is Cancel then exit to top end if Most of the time it compiles, but sometimes the single line if statement in the middle throws and error

Re: nested ifs

2006-01-25 Thread Stephen Barncard
Chipp, I think the compiler doesn't like dangling THEN's in any case, and in fact would be much happier with END IF when the statement gets long. Using this form always works (and for me easier to read anyway...) - it takes up more space though. IF condition THEN -- statements ELSE --

Re: nested ifs

2006-01-25 Thread David Bovill
On 25 Jan 2006, at 11:32, Chipp Walters wrote: Anyone know why the compiler does this? I can't seem to figure out under what circumstances this seems to happen. No - but it is annoying! ___ use-revolution mailing list

Re: nested ifs

2006-01-25 Thread simplsol
, 25 Jan 2006 17:21:06 + Subject: Re: nested ifs On 25 Jan 2006, at 10:32, Chipp Walters wrote:    I like to do the following:    if tResult is Error then  answer Go Ahead anyway with Cancel or OK  if it is Cancel then exit to top  end if    Most of the time it compiles, but sometimes

Re: nested ifs

2006-01-25 Thread Stephen Barncard
Why? If one uses the 'classic' full IF-THEN_ELSE-ENDIF with all KEYWORDS on separate lines, it always works, and it is not ambiguous as with dangling THENs. We certainly don't have this kind of problem with CASE statements, do we? They are what they are - there's a form, and one follows it -

Re: nested ifs

2006-01-25 Thread Chipp Walters
Stephen Barncard wrote: Why? If one uses the 'classic' full IF-THEN_ELSE-ENDIF with all KEYWORDS on separate lines, it always works, and it is not ambiguous as with dangling THENs. We certainly don't have this kind of problem with CASE statements, do we? They are what they are - there's a

Re: nested ifs

2006-01-25 Thread Stephen Barncard
Chipp, I use that form all the time (if it is empty then exit to top) - I just had a problem regarding dangling THENs.. IF condition THEN command IF condition THEN command Does one execute after the other, or is the second executed only after the first condition is met? THIS is not clear, so

Re: nested ifs

2006-01-25 Thread Chipp Walters
Stephen, Yeah, me too. I don't like _THAT_ notation either. Stephen Barncard wrote: Chipp, I use that form all the time (if it is empty then exit to top) - I just had a problem regarding dangling THENs.. IF condition THEN command IF condition THEN command

Re: nested ifs

2006-01-25 Thread Brian Yennie
Dave, Chipp, et al. Consider that the following snippet is actually ambiguous. Notice two different formatting passes at exactly the same code. Now, of course, the first formatting actually resolves to valid code, while the second one is one end if short -- but who is the compiler to say