PICBASIC Pro examples will not compile????


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by N6VMO_ View Post
    Right out of the MicroCode Studio Help:


    FOR B0 = 0 TO 5 ' Count from 0 to 5
    LOOKUP B0,["Hello!"],B1 ' Get character number B0 from string to variable B1
    SEROUT 0,N2400,[B1] ' Send character in B1 to Pin0 serially
    NEXT B0 ' Do next character
    You have to define your variables B0 and B1. Or you can add this include to your program. See page 24 ish of the manual.
    Code:
    Include "bs2defs.BAS"
    
    FOR B0 = 0 TO 5 ' Count from 0 to 5
    LOOKUP B0,["Hello!"],B1 ' Get character number B0 from string to variable B1
    SEROUT 0,N2400,[B1] ' Send character in B1 to Pin0 serially
    NEXT B0 ' Do next character

  2. #2
    Join Date
    Jul 2010
    Posts
    12


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by scalerobotics View Post
    You have to define your variables B0 and B1. Or you can add this include to your program. See page 24 ish of the manual.
    Code:
    Include "bs2defs.BAS"
    
    FOR B0 = 0 TO 5 ' Count from 0 to 5
    LOOKUP B0,["Hello!"],B1 ' Get character number B0 from string to variable B1
    SEROUT 0,N2400,[B1] ' Send character in B1 to Pin0 serially
    NEXT B0 ' Do next character
    OK, I will give it a try...and read a bit more too.

    Thank you!

    John

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