pointer_02.bmx 217 B

123456789
  1. 'Test for negative array indices
  2. 'Source: https://github.com/bmx-ng/bcc/issues/248
  3. 'Author: HurryStarfish
  4. SuperStrict
  5. Framework BRL.StandardIO
  6. Local a:Int[] = [7,8,9]
  7. Local p:Int Ptr = Varptr a[1]
  8. Print p[-1]