mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
samples: add Terra samples
source: https://github.com/zdevito/terra/tree/master/tests
This commit is contained in:
12
samples/Terra/printfarray.t
Normal file
12
samples/Terra/printfarray.t
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
C = terralib.includec("stdio.h")
|
||||
|
||||
terra char(a : &int8) : int8
|
||||
return a[0]
|
||||
end
|
||||
terra foobar()
|
||||
var a = arrayof(int8,char("a"),0)
|
||||
C.printf("%s\n",a)
|
||||
end
|
||||
foobar()
|
||||
Reference in New Issue
Block a user