Loading ...
Sorry, an error occurred while loading the content.

Re: [jallist] Re: if then else

Expand Messages
  • Bert van Dam
    Hi Frans, ... The syntax is: IF [this is true] THEN [true, so do this] ELSE [not true (false), so do this] END IF Since 1 is the same as true, this is the
    Message 1 of 9 , Aug 1, 2011
    • 0 Attachment
      Hi Frans,

      > The first statement is "if". For good understanding: If supposes always a "1"? For that reason it's not necessary to write it?

      The syntax is:

      IF [this is true] THEN
      [true, so do this]
      ELSE
      [not true (false), so do this]
      END IF

      Since 1 is the same as true, this is the same:

      IF [this is 1] THEN
      [1, so do this]
      ELSE
      [not 1, so do this]
      END IF

      > Is : if pin_d1==o  also possible?

      Yes, pin_d1==0 is also possible.

      >When using een active zero fot switching. I suppose in that case you have to write it completely?

      Yes.

      > And what is the second statement?

      It's time to start experimenting Frans. You have received very
      accurate reactions to your question, now I recommend you try all your
      questions in a simple program and try to gain understanding of the
      function of the "if" statement. Otherwise you will be flooded in
      theory, while the reality is in fact quite simple, once you understand
      the basics.

      So load a program with an "if" statement and see what happens if you
      change stuff.

      Have fun,
      Bert


      www.vandam.tk
    Your message has been successfully submitted and would be delivered to recipients shortly.