PDA

View Full Version : Syntax error



martinwinlow
- 25th December 2012, 12:26
Can anyone tell me what is wrong with this ...

hserout [hex2 S[(((L-1)*8)+cnt)]]

It throws a compiling error "Expected ']' or ')']'
Syntax error


There are equal numbers of brackets...?

MW

HenrikOlsson
- 25th December 2012, 14:36
Hi,
That just looks wrong....What's it supposed to do?
I don't think you should use square brackets "inside" the actual statement, only enclosing it - and perhaps there's a missing comma?


HSEROUT [hex2 S, (((L-1)*8)+cnt)]

But again, not easy to say withoyt knowing what's it supposed to do.

/Henrik.

martinwinlow
- 25th December 2012, 18:40
Hi - Thanks for your reply. Tried it again having replaced all but the outermost brackets with ( or ) and it has fixed it. Of course, now I get some different errors. Haven't a clue what I'm doing really! If I get stuck again "I'll be back!" as they say. It's a bit of a steep learning curve after VB6. MW