Old classic If-Then...


Closed Thread
Results 1 to 17 of 17

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    Hi, Ioannis

    Do not use " IF thermistor1 = 1" but "IF Thermistor" ... result is the same

    Do not use " IF thermistor1 = 0 " but "IF NOT Thermistor" ... result is the same

    Alain
    Could you please explain a little more, so I can understand why ?
    Thank You
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    I understand why.. the problem is to explain... enjoy the following language barrier mess

    If ConditionIsTrue Then DoSomething

    Dealing with Bit Var, you have ONLY 2 choices... OR the var is 1 OR the var 0, True or False.

    So why messing with condition if your variable already hold it?

    It's just another way to write your IF-THEN
    Last edited by mister_e; - 1st November 2008 at 20:41.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Classic
    By Haggar in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th April 2005, 09:57

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts