Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC Basic code error can you help, probably very simple

Status
Not open for further replies.

lompa

New Member
im trying to create a variable PW but i get this error

**broken link removed**

what am i doing wrong
 
Its probably just the wording of the line.Look in the help section on creating symbols.
Different Basic compilers use differing syntax.
 
Symbol should be declared before the "main:" section. Also, you should declare "pw" before you use the symbol:

Code:
  dim pw as word
  symbol  B1 = pw
main:
...
 
Declare variable name

Hi,
If you want to use variable name "PW", you must declare it first in PicBasic Pro version. In PicBasic STD version,we don't need to declare variable and we can use pre defined variables.

Please declare like that:

PW var bit
or
PW var byte :)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top