| ECS-L Home Automation and Security Archives |
| Subject: From: Date: | Re: [ECS] IF, THEN, ELSE....OR MAYBE NOT? Mark Gilmore Wed, 15 Nov 2000 12:12:03 -0500 |
yes Kevin Trainor wrote: > > Mark: > > I take it from your last two messages that the BEGINIF block does not > support the ELSE case for the conditional that is tested on the opening line > of the block. That is to say that when the conditional is false, the logic > drops immediately down to the code below the ENDIF. There is no way to > catch the ELSE case for the opening conditional within the BEGINIF block > itself. > > Am I right? > > Kevin > ----- Original Message ----- > From: "Mark Gilmore" <omnip@usit.net> > To: <ecs-list@netbloc.com> > Sent: Wednesday, November 15, 2000 9:12 AM > Subject: Re: [ECS] IF, THEN, ELSE....OR MAYBE NOT? > > > WAIT: I misread your 1st question. > > Look at a BEGINIF as a "GOTO" (ECS simply jumps to the > > ENDIF if the BEGINIF condition is FALSE). > > -- > > Mark Gilmore > > Omnipotence (ECS home automation software) > > http://omnipotencesoftware.com > > 423-745-0026 > > Hours: Mon-Sat, 9AM-8PM/EST > > > > > > Kevin Trainor wrote: > > > > > > Mark: > > > > > > Thanks. > > > > > > A few more finer point questions on the subject: > > > > > > 1. Can you use all of the same features of IF when using BEGINIF? For > > > instance, can you use ELSEIF within a BEGINIF block? > > > > > > 2. I take it that there is no ELSEBEGINIF? > > > > > > Kevin > > > ----- Original Message ----- > > > From: "Mark Gilmore" <omnip@usit.net> > > > To: <ecs-list@netbloc.com> > > > Sent: Wednesday, November 15, 2000 8:27 AM > > > Subject: Re: [ECS] IF, THEN, ELSE....OR MAYBE NOT? > > > > > > > Yes (my mistake) > > > > -- > > > > Mark Gilmore > > > > Omnipotence (ECS home automation software) > > > > http://omnipotencesoftware.com > > > > 423-745-0026 > > > > Hours: Mon-Sat, 9AM-8PM/EST > > > > > > > > > > > > Kevin Trainor wrote: > > > > > > > > > > Mark: > > > > > > > > > > Is it really possible to code the ELSE on a line by itself? Or, > does it > > > > > have to be combined with the first statement to be executed in the > block > > > of > > > > > else statements? For example, don't I really have to code it as: > > > > > > > > > > if cond > > > > > then statement 1 > > > > > then statement 2 > > > > > else statement 3 > > > > > then statement 4 > > > > > > > > > > rather than: > > > > > > > > > > if cond > > > > > then statement 1 > > > > > then statement 2 > > > > > else > > > > > then statement 3 > > > > > then statement 4 > > > > > > > > > > I know that this is a fine distinction. But, perhaps it is what is > > > giving > > > > > me problems. > > > > > > > > > > Kevin > > > > > > > > > > ----- Original Message ----- > > > > > From: "Mark Gilmore" <omnip@usit.net> > > > > > To: <ecs-list@netbloc.com> > > > > > Sent: Wednesday, November 15, 2000 8:01 AM > > > > > Subject: Re: [ECS] IF, THEN, ELSE....OR MAYBE NOT? > > > > > > > > > > > if cond > > > > > > then > > > > > > then > > > > > > else > > > > > > then > > > > > > then > > > > > > ... > > > > > > -- > > > > > > Mark Gilmore > > > > > > Omnipotence (ECS home automation software) > > > > > > http://omnipotencesoftware.com > > > > > > 423-745-0026 > > > > > > Hours: Mon-Sat, 9AM-8PM/EST > > > > > > > > > > > > -- Mark Gilmore Omnipotence (ECS home automation software) http://omnipotencesoftware.com 423-745-0026 Hours: Mon-Sat, 9AM-8PM/EST