PDA

View Full Version : IF ELSEIF Question



Silver242
07-23-2009, 01:16 AM
Hi,

· I have the PE Kit , and·i have a question about··chapter 7 in the first program· (TestRcDecay) i want to turn led on when for example the time = 215
i used this way·

con

·Red· = 215


pub

·if· Red = time
··· !outa[4]

but it·didnt work.·please help .

Nick Mueller
07-23-2009, 01:28 AM
The operator to test for equality is "=="

Nick

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Never use force, just go for a bigger hammer!

The DIY Digital-Readout for mills, lathes etc.:
YADRO (http://www.yadro.de)

Silver242
07-23-2009, 01:44 AM
I changed the equality to == , but it didnt work

Timmoore
07-23-2009, 01:58 AM
have you got a dira := 1 to set the pin to be an output?

Mike Green
07-23-2009, 02:04 AM
That should be "dira[ 4 ] := 1" before the if statement

Silver242
07-23-2009, 02:23 AM
Thanks everyone it works.