Problem with pointer in mikrobasic for AVR .

General discussion on mikroBasic for AVR.
Post Reply
Author
Message
Adam
Posts: 38
Joined: 18 Sep 2008 10:21

Problem with pointer in mikrobasic for AVR .

#1 Post by Adam » 01 Dec 2008 04:33

I have this code
program hoanthanhlcd
const aaa as byte[8]=(1,2,3,4,5,6,4,3)
dim mypointer as ^byte
t as string[3]

main:
Glcd_Init(PORTC, 1, 2, 5, 4, 0, 3, PORTB) 'init GLCD
Glcd_Set_Font(font5x8, 5, 8, 32)
glcd_fill(0) 'clear screen


mypointer= @aaa
mypointer=mypointer+1

bytetostr( mypointer^,t)
glcd_write_text( t,32,0,1)
end.
The result is : 255 . Is that right or wrong ?

Post Reply

Return to “mikroBasic for AVR General”