tarrayboundeval.nim 458 B

1234567891011121314151617181920212223242526272829303132
  1. discard """
  2. output: '''7
  3. 8 8
  4. -2'''
  5. """
  6. #bug 1063
  7. const
  8. KeyMax = 227
  9. myconst = int((KeyMax + 31) / 32)
  10. type
  11. FU = array[int((KeyMax + 31) / 32), cuint]
  12. echo FU.high
  13. type
  14. PKeyboard* = ptr object
  15. TKeyboardState* = object
  16. display*: pointer
  17. internal: array[int((KeyMax + 31)/32), cuint]
  18. echo myconst, " ", int((KeyMax + 31) / 32)
  19. #bug 1304 or something:
  20. const constArray: array[-3..2, int] = [-3, -2, -1, 0, 1, 2]
  21. echo constArray[-2]