SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
ifthen clarification

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
ifthen clarification
Author Message
Ben Ridout



Joined: 14 Jul 2005
Posts: 5

Post ifthen clarification Reply with quote

I find the JAL "ifthen" contruct particularly confusing. Is there any particular reason it works the way it does?

Is there some language out there where the false condition falls inside the ifthen block? This seems contrary to anything I've ever encountered.

Please correct me if I am misunderstanding this:

Dim flag, Boolean, true
IfThen (flag, GoHere)
// runs when flag is false (I think)
MessageBox "1"
GoHere:
MessageBox "2"

When flag == TRUE, above will display (message box with):
2

When flag == FALSE, above will display (message boxes with):
1
2

It seems that the only point of the label (GoHere in my example) is to terminate the statement-block, and that block is only executed when the ifthen condition is false.
Am I understanding this right?

Thanks.
-BR


Tue Jul 19, 2005 11:18 am View user's profile Send private message
Ben Ridout



Joined: 14 Jul 2005
Posts: 5

Post Re: ifthen clarification Reply with quote

: I find the JAL "ifthen" contruct particularly confusing. Is there
: any particular reason it works the way it does?

: Is there some language out there where the false condition falls inside the
: ifthen block? This seems contrary to anything I've ever encountered.

: Please correct me if I am misunderstanding this: Dim flag, Boolean, true
: IfThen (flag, GoHere)
: // runs when flag is false (I think)
: MessageBox "1"
: GoHere: MessageBox "2"

: When flag == TRUE, above will display (message box with): 2

: When flag == FALSE, above will display (message boxes with): 1
: 2

: It seems that the only point of the label (GoHere in my example) is to
: terminate the statement-block, and that block is only executed when the
: ifthen condition is false.
: Am I understanding this right?

: Thanks.
: -BR

After reviewing the docs, it seems the plain "if" statement makes a lot more sense to me. I guess I can depend on that for most of my needs.

Tue Jul 19, 2005 11:22 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7975

Post Re: ifthen clarification Reply with quote

IfThen is good for error handling

Consider this as a logical construct like "IF problem JUMP to ERROR HANDLER otherwise coninue"

: After reviewing the docs, it seems the plain "if" statement makes a
: lot more sense to me. I guess I can depend on that for most of my needs.

Tue Jul 19, 2005 11:45 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.