While not offering any detail, the Repeat statement in the manual does demonstrate it.
While not offering any detail, the Repeat statement in the manual does demonstrate it.
I have the pbp manual , different version with you? I can not found the statment "repeat", while I found the word in it : )
1.2. About This Manual
This manual cannot be a full treatise on the BASIC language. It
describes the PicBasic Pro Compiler instruction set and provides
examples on how to use it.
I have an ol' version of the manual.. for compiler version 2.47 (date 9/05). REPEAT is located in section 5.66
But yeah... it show they use it... but they don't explain anything
Online version show date 3/04, Repeat is still at 5.66, same... everything.
I didn't check the whole manual.. but here's my understand.. i'll do it once
It's nothing more than another kind of fussy writing thing. Which perform some kind of text substitution thingy.
YourVar=4
Something.0[YourVar]=1
becomes Something.04=1
That's the easiest way i see to explain it... but yeah.... why it's like that? ... because![]()
Last edited by mister_e; - 11th April 2008 at 10:04.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
I'm not sure why they didn't just allow you do use VAR.BIT=0 instead of VAR.0[BIT]=0.
What would be nice is to be able to also do this: VAR[INDEX].BIT=0
I came across a situation just yesterday that required me to set a bit in a word, in an array to the same as another bit in another word in another array, so if it was allowed would be like this:
VAR1[INDEX].BIT=VAR2[INDEX].BIT
Instead of one line like above, it ended up being 5 lines.
No matter tho, theres always a way around these things.
"I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams
Bookmarks