If ... Then Gosub <> If ... Then Goto?


Results 1 to 7 of 7

Threaded View

  1. #2
    Join Date
    May 2004
    Location
    New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default

    Well, in newer versions of PBPro you can write:

    IF LCD_Present THEN (label) ; If LCD_Present is more than 0, do something at "label"

    No need for the "GOTO" or the "=1"
    Don't know which PBP versions support this, of if it will work in PBC

    EDIT
    oopps didn't realize that you were asking about gosub - not goto!
    What if you used the IF-THEN-GOTO, and after the code at the GOTO label you used another GOTO to come back where you were? I guess you'd still have to type the extra lines though.

    EndEDIT
    Last edited by Archilochus; - 26th February 2006 at 17:26.

Similar Threads

  1. Graphic LCD with PICbasic pro
    By amindzo in forum mel PIC BASIC Pro
    Replies: 41
    Last Post: - 25th November 2012, 11:45
  2. Making a menu
    By chrisshortys in forum mel PIC BASIC Pro
    Replies: 36
    Last Post: - 12th November 2008, 19:54
  3. Problems with RC2 and RC3
    By Christopher4187 in forum General
    Replies: 11
    Last Post: - 29th May 2006, 17:19
  4. Output PIC module
    By freelancebee in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th September 2005, 20:10
  5. ds1307 from f877 to f452 not work
    By microkam in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th July 2005, 00:02

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