-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.ply
More file actions
58 lines (38 loc) · 1.05 KB
/
test.ply
File metadata and controls
58 lines (38 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
;; Copyright (c) 2009, Nicholas "Indy" Ray. All rights reserved.
;; See the LICENSE file for usage, modification, and distribution terms.
(declare (div_add x :float y :float z :float) :float)
(define-type mytype int)
; putchar from the c stdlib.
(declare (putchar c :mytype) :int)
(div_add 1.0 2.0 3.0)
(putchar 72)
(putchar 101)
(putchar 108)
(putchar 108)
(putchar 111)
(putchar 44)
(putchar 32)
(putchar 87)
(putchar 111)
(putchar 114)
(putchar 108)
(putchar 100)
(putchar 33)
(putchar 10)
(define (div_add x :float y :float z :float) :(float) (+ (/ x y) z))
(define (testme x : (int 8)) : (int 8) x)
(putchar 0xFF)
(putchar b010101)
(define (test-string x : string) : (pointer (int 8)) x)
(test-string "Hello World")
(define-type my-tuple (tuple int int))
(define (test_tuple x :my-tuple) :int (+ (# 0 x) (# 1 x)))
(test_tuple (make-tuple 3 4))
;;(define-type my-struct (struct
;; (x int)
;; (y int)))
;;(define (test_struct x :my-struct) :int
;; (+ (# x x :my-struct) (# y x :my-struct)))
;; (define-struct my-struct
;; (x int)
;; (y int))