Shop OBEX P1 Docs P2 Docs Learn Events
end of line — Parallax Forums

end of line

cornflowerbluecornflowerblue Posts: 6
edited 2006-12-01 15:18 in BASIC Stamp
everytime I try to tokenize, the program keeps telling I need an end of line after SYMBOL. Does anyone know why and what I need to do? I have attached my file

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-12-01 04:23
    Hello,
    ·
    ·· You have the Symbol name before the keyword SYMBOL.· Place·SYMBOL first and you should be alright.· Take care.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • cornflowerbluecornflowerblue Posts: 6
    edited 2006-12-01 04:30
    I tried that and I am still receiveing an error expecting and end-of-line. I have attached the switched version.
    Thanks for the suggestion
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-12-01 04:41
    You have a BS2 directive in the code instead of a BS1 directive...I didn't see that before.· You also have a VAR declaration which won't work either as well as a label with no Colon.· Take care.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • cornflowerbluecornflowerblue Posts: 6
    edited 2006-12-01 04:56
    what labels need colons and where do you place them?
    Do you know any PBasic for dummy resources? I've never programmed in PBasic and overall I have very little programming experience. Thanks
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-12-01 05:05
    Hello,
    ·
    ·· I was going to just save the file with the corrections, but it seems some of your variable declarations overwrite each other.· For example you are using W0 as well as B0 and B1 (Which make up W0).· The BASIC Stamp Manual is probably the best reference we currently have for the BS1.· I would recommend looking at the sections on memory to see how things are arranged.· If you click on Syntax Check it will highlight where the other errors are.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • cornflowerbluecornflowerblue Posts: 6
    edited 2006-12-01 14:11
    I thought I was allowed to define Wo and then more specifically define its high B0 and low B1. Thanks for your help.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-12-01 15:06
    You can…It’s not clear from your code that is what you’re doing since there are no comments on those lines, but the first line indicates an I/O variable rather then temperature.· Also your gmax variable is being declared using BS2 syntax.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • metron9metron9 Posts: 1,100
    edited 2006-12-01 15:18
    Somebody said...
    More importantly, mixing fixed variables with automatically allocated variables (discussed in the next section) is an invitation to bugs

    In your variable declarations you use fixed variables and automatically allocated variables BYTE(2) is an automatic allocated variable

    I don't think with BS1 that you can even use VAR
    Somebody said...
    On the BS2-family, you can also define multipart variables called arrays.

    Notice it says Bs2 family, you can't use "gmax VAR byte(2)" on a BS1 the help file shows both BS1 and BS2 and others, the color codes show the stamp the help refers too.

    So you are also mixing BS2 code with BS1 code.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
Sign In or Register to comment.