Shop OBEX P1 Docs P2 Docs Learn Events
Cannot Declare SYMBOL - please help - simple question — Parallax Forums

Cannot Declare SYMBOL - please help - simple question

hiren97hiren97 Posts: 9
edited 2007-12-03 09:20 in BASIC Stamp
Hi,

I am trying to declare one variable by

' {$STAMP BS2}
' {$PBASIC 2.5}

SYMBOL day = 8
SYMBOL night = 4


editor highlists SYMBOL and says "Lable is mising ":" "

I need to present project by tuesday..please hurry...

I have basic stamp kit BS2 ....and writing traffic signal program...pleaase help...

Hiren Patel
hiren97@yahoo.com

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-12-03 07:36
    The SYMBOL is not used with the BS2. It's used only with BS1 programs.
    Just remove it and change the "=" to "CON" as shown in the manual.
    In other words, you would have:
    day CON 8
    night CON 4
    


    Don't forget to use "xxx VAR BYTE" to declare byte variables, etc.
  • hiren97hiren97 Posts: 9
    edited 2007-12-03 07:42
    day VAR Byte
    day = 5

    works..thank you...

    CON don't...

    thanls anywayz mike
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-12-03 09:20
    mike -

    Continuing with your example:

    day VAR BYTE

    five CON 5

    day = five

    should work fine.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sign In or Register to comment.