But where was the "K" coming from???
I do not get a "K".
But where was the "K" coming from???
I do not get a "K".
Dave
Always wear safety glasses while programming.
I found it's a weird way... and a bit obscure...i would usedCode:loop: FOR letters = STRING[0] to STRING[9] SEROUT PORTC.6,T9600,["string is ",(LETTERS),13,10] PAUSE 500 NEXT letters GOTO loop
seems more valuable no?Code:loop: FOR letters = 0 to 9 SEROUT PORTC.6,T9600,["string is ",STRING[LETTERS],13,10] PAUSE 500 NEXT letters GOTO loop
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Well that and the way Jerson pointed out, would for sure be the proper way to go,
but it should still work the way he had it originally as long as characters between string[0]
and string[9] were in order.
If you had values assigned to individual elements like say;
string[0]= "A"
string[1]= "Z"
string[2]= "P"
string[3]= "O"
string[4]= "M"
string[5]= "H"
string[6]= "X"
string[7]= "G"
string[8]= "W"
string[9]= "J"
Then doing it his original way, it wouldn't return the correct values in each element.
It would still print A,B,C,D,E,F,G,H,I,J.
Like Dave, I'm kinda curious where that "K" came from?
Last edited by Bruce; - 28th May 2008 at 20:54. Reason: The "K"
That was my point... hidden between the linesUnless a simple FOR To Next without array would have worked.
Edit: seems i missed Jerson's post![]()
Last edited by mister_e; - 28th May 2008 at 20:57.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hi Bruce, Mister_e,Mackracket, . . .
Yeaaaa . . . Kinda weirded me out too, I was using a 16F628A, and yes I forgot to put CMCON=7 in, but I was not using PortA. It very definately went from A - K,though I expected it to stop with "J". Jerson straightened me out, still I do not know why it went to K. PBP ver 2.5
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks