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.

PicBasic

Status
Not open for further replies.

GatorGnet

New Member
I'm getting tired and making basic mistakes with code. I have defined variables and want to put something into them at the start. Here is what I am doing but when it reaches the lines with the:

Something = "blah"

I get syntax errors. What am I doing wrong?

I'm not that new but it has been a while.

Code:
DebugMSG var Word
Version var WORD

'Set Variables

Version = '1.01a'
DebugMSG = 'Working Correctly'
 
Sorry, don't program in that language, but you could try something like:
Code:
DebugMSG var string*6
Version var string*20

'Set Variables

Version = "1.01a"
DebugMSG = "Working Correctly"
 
To start with it seems that you have defined your variables as numerical and not as strings.

Try Version$ and DebugMSG$

to save on memory I would define them as constants

I don't often use Picbasic myself as I prefer MicroBasic However both are similar.
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top