A bright idea ?
Nav
Posts: 23
I've got Version 2.1 of PBasic Editor running under Windows XP.
When I create a subroutine with the name 'bright' the editor seems to mistake it for a reserved word.· It changes 'bright' to 'BRIGHT' and colours it Magenta.· According to the preferences in the Editor, it seems that 'bright' is being recognised a Predefined Constant or Predefined Variable.· I was using the word as a subroutine name in a program for the MAX7219.
If you just carry regardless and do a Syntax Check on the program the word 'bright' is highlighted and·you get an error message saying "Expected a Label, Variable or Instruction".· I'm just curious as to the reason for this.· Sorry for the lame pun in the heading. [noparse]:)[/noparse]
·
When I create a subroutine with the name 'bright' the editor seems to mistake it for a reserved word.· It changes 'bright' to 'BRIGHT' and colours it Magenta.· According to the preferences in the Editor, it seems that 'bright' is being recognised a Predefined Constant or Predefined Variable.· I was using the word as a subroutine name in a program for the MAX7219.
If you just carry regardless and do a Syntax Check on the program the word 'bright' is highlighted and·you get an error message saying "Expected a Label, Variable or Instruction".· I'm just curious as to the reason for this.· Sorry for the lame pun in the heading. [noparse]:)[/noparse]
·
Comments
You might want to check out the help file. It appears that BRIGHT is a reserved constant used with the X10 commands as in DIM & BRIGHT.
Lee
Lee is indeed correct. You can find all of the reserved words in Appendix B of the Parallax PBASIC Stamp Manual.
Regards,
Bruce Bates
Second, you *should* be able to use something like 'MyBright', 'FullBright', 'GoBright', 'LightBright', or similar.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
Thanks for your responses, guys.