PDA

View Full Version : end of line



cornflowerblue
12-01-2006, 11:06 AM
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

Chris Savage
12-01-2006, 11:23 AM
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

cornflowerblue
12-01-2006, 11:30 AM
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 Savage
12-01-2006, 11:41 AM
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

cornflowerblue
12-01-2006, 11:56 AM
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 Savage
12-01-2006, 12:05 PM
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

cornflowerblue
12-01-2006, 09:11 PM
I thought I was allowed to define Wo and then more specifically define its high B0 and low B1. Thanks for your help.

Chris Savage
12-01-2006, 10:06 PM
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

metron9
12-01-2006, 10:18 PM
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!