> > I have an array of 299 chars, but I have a problem - after 255 the > > array wraps round, i.e. if I do > > a[257]=1 > > then I will get a[1]=1 > > Why is this happening? > > I define the array like so: > > > > static byte a[299]; > > > > thanks, > > Andy. > What size is your index variable, sounds like its only > 8 bits. No, it happens also with literals, i.e. if I do a[257]=1 and actually use '257' then I get a[1]=1 > > Jim -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist