PDA

View Full Version : Problems Upgrading from Demo to Pic Basic and MCS-Plus



wadebbi
- 9th November 2007, 02:43
Any advice is appreciated ...

When using the Demo version of PicBasic Pro and MicroCode Studio, I wrote a simple program and it compliled and loaded fine. I purchased Pic Basic (not pro) and MicroCode Studio Plus. Now my program won't compile ... it breaks at the first line of code.

Line 16: sel VAR BYTE

Error:ERROR Line 16: ':' or '=' Expected (Token 'var') (FullTest wit For Next.pbp)


Errors for the rest of simple program:

ERROR Line 22: Variable Expected (Token 'PORTB') (FullTest wit For Next.pbp)
ERROR Line 22: Illegal Character '.' (FullTest wit For Next.pbp)
ERROR Line 25: ':' or '=' Expected (FullTest wit For Next.pbp)
ERROR Line 27: Variable Expected (Token 'PORTB') (FullTest wit For Next.pbp)
ERROR Line 27: Illegal Character '.' (FullTest wit For Next.pbp)
ERROR Line 28: Variable Expected (Token 'Sel') (FullTest wit For Next.pbp)
ERROR Line 33: NEXT Without Matching FOR (FullTest wit For Next.pbp)
ERROR Line 34: ':' or '=' Expected (FullTest wit For Next.pbp)
ERROR Line 36: Variable Expected (Token 'PORTB') (FullTest wit For Next.pbp)
ERROR Line 36: Illegal Character '.' (FullTest wit For Next.pbp)
ERROR Line 37: Variable Expected (Token 'Sel') (FullTest wit For Next.pbp)
ERROR Line 42: NEXT Without Matching FOR (FullTest wit For Next.pbp)
ERROR Line 43: ':' or '=' Expected (FullTest wit For Next.pbp)

MarioC
- 9th November 2007, 06:49
Hello.

Can you provide the code?

paul borgmeier
- 10th November 2007, 05:41
Did you get your problem sorted out? ... Unfortunately, the syntax of PB is not as well developed as in PBP. In PB, the variables for the most part are predefined for you. You need to do something like this:

Instead of this

sel var byte

You need to do this


Symbol sel = B0 ; sel is now aliased to B0 (B0 is predefined)

If you post more code people here can help you translate to help get you going.

Good Luck,

wadebbi
- 10th November 2007, 23:38
Thanks to all of you for your assistance. I realize now that I should have purchased PB Pro.

Thanks again