summary refs log tree commit diff stats
path: root/tests/init/tzeroarray.nim
blob: b784b601e7abba9a80c7b172d1fc2d21355489b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
discard """
  output: done
"""

for i in 0 .. 1:
  var a: array[0..4, int]
  if a[0] != 0: quit "bug"
  a[0] = 6

proc main =
  for i in 0 .. 1:
    var a: array[0..4, int]
    if a[0] != 0: quit "bug"
    a[0] = 6

main()
echo "done"
s="o">= "directory" gtDOSBinary = "DOS binary" gtSearch = "search" gtMessage = "message" gtSound = "sound" gtGif = "gif" gtHTML = "HTML" gtInfo = "" gtImage = "image" gtBinary = "binary" gtPng = "png" func gopherType*(c: char): GopherType = return case c of '0': gtTextFile of '1': gtDirectory of '3': gtError of '5': gtDOSBinary of '7': gtSearch of 'm': gtMessage of 's': gtSound of 'g': gtGif of 'h': gtHTML of 'i': gtInfo of 'I': gtImage of '9': gtBinary of 'p': gtPng else: gtUnknown