Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Simple IF loop question

Status
Not open for further replies.

cloudz88

Member level 1
Joined
Sep 6, 2007
Messages
35
Helped
3
Reputation
6
Reaction score
0
Trophy points
1,286
Activity points
1,522
if i use If loop......and i need to put in 2 condition.....how should i write?

if ( condition 1 & condition 2 ) then
.
.
.
end if;

liddat??

some1 pls help..
 

yes you can do that way, if u need to execute the command when the 2 condition hold true.
 

if(cond1 & cond2) then

;

endif

//// the selection strcuture will execute only if both are true

to make the execution to run when only one of the conditions is true use or operator like

if(cond1 | cond2) then

;;

endif
 

Hi,
I think u can do like u stated , but consider the other logic levels on your condition1 and condition2 as well.
 

the conditional expression for the IF statement will give a TRUE/FALSE notion at the end...so whatever you put (even with logical operators), it will be a YES or a NO at the end :D (whether to take the if statements or the else)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top