Welcome to the COE Discussion Forum! 

 

To participate in the discussion forum, you must be logged in to the website.  If you forget your login information, please contact COE Headquarters at coe@coe.org or (800) 263-2255.

If you are new to the COE Discussion Forum and would like to participate, please register.

 

COE DISCUSSION FORUM
Subject: nested if statments

You are not authorized to post a reply.   
Author Messages
COE-FORUM-USER

30 Jun 2006 06:49 AM
Hello All,

running catia v5 r12, not sure which service pack, on a unix machine.

Having had a look at the rather cryptic help regarding 'if statments', I am no wiser as to the syntax of nesting if staments.

What I have is a parameter: 'Seat Travel', with two options: '>133mm' or '=<133mm,' with a second parameter '%ile' with two options: '95%ile' or '99%ile'.

The required layout would be something like:

if 'seat travel' == >133mm

if %ile == '95%ile'
statment
else
statment

else 'steat Travel' == <133mm

as above

I get the impresion '[]' are involved but not sure how, I would appreciate if you could point me in the right direction.

Thanks for you help.
THUNDERLASSE

03 Jul 2006 05:54 AM
Hi,

It works with following syntax:

/*Rule created by lpurma 03.07.2006*/

if Seat_travel >= 133mm
{
if percentige ==95
{
A=1
}
else
{
A=2
}
}
else if Seat_travel <133mm
{
if percentige ==95
{
A=3
}
else
{
A=4
}
}

Here statements are giving value to parameter called A (just to test it)


BR,
Lasse
COE-FORUM-USER

03 Jul 2006 06:21 AM
Thanks for that. It worked without any problems.

My 'help' suggests using square brackets rather than curly, for breaking up the different levels!!
You are not authorized to post a reply.
Forums > COE Forums > KBE > nested if statments



ActiveForums 3.6

    

401 North Michigan Avenue, Chicago, IL 60611-4267 | (312) 321-5153 | (800) COE-CALL (U.S.)