Question about If Then


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Mar 2009
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Alektric View Post
    Yes, I have tried that. PB pro does look much better! In PB, Else is seen to be a label and it gives a ": expected" error on the line with Else on it. The method that works is very similar to what you suggested:

    If B0 = 1 Then LIGHTON
    Low 7
    Goto NEXTPART
    LIGHTON:
    High 7
    NEXTPART:
    (code continues)

    But unlike this most simple example, things start to get complicated (for me) when there are more If statements referring to that variable which makes what should be a single code block get spread out across many jump labels.

    So the Else and EndIf commands are used in PB pro? - I'll have to look into it. Thanks for the help.
    I also have run into this.
    PB is not what I was expecting, or sold for that matter.
    Nothing works like the examples given.
    I even get errors compiling the examples as you state.

    I cannot define VAR, CON, INCLUDES, etc. whats up with that?
    I'm gonna have to go back to MPLab asm at least it WORKS like I expect!

    I thought buying PB was going to help but it has made things more difficult.

    All I want to do is read pins and set pins with some if---elses but all I can do is peek and poke. I might as well just do asm if I have to write code in broken assembler...

    I am not trying to stir the pot but this is not straight forward as it is shown
    in software examples.

    Back to asm I go, ugh!!!


    -M_Z-

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Did you buy PBP (PicBasic Pro) or PBC (PicBasic Compiler).

    If you got PBP, then all those things will work.

    If you took the cheeper version (PBC) ... then you have a LONG nighmare ahead of you.
    DT

Similar Threads

  1. ADCIN question
    By Greg McFadden in forum General
    Replies: 4
    Last Post: - 16th September 2008, 02:53
  2. AN Question for "word" variable read The serial port
    By redfoen in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 14th December 2007, 17:39
  3. Remote PIC input question
    By Adrian in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 1st September 2007, 15:44
  4. Question for a math guru
    By Christopher4187 in forum General
    Replies: 3
    Last Post: - 22nd November 2006, 09:45
  5. Please answer my first question
    By John_001 in forum Off Topic
    Replies: 1
    Last Post: - 15th September 2006, 06:49

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