blob: 8224fb518ad6335f1eef04c3cb66e880ba955de7 (
plain) (
blame)
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
|
* C interoperatibility example (without imports)
public function main
types
socket prototype
linkage
domain word
type word
protocol word
fd word
procedure using domain type protocol returning fd
close prototype
linkage
fd word
status word
procedure using fd returning status
AF_INET constant to 2
SOCK_STREAM constant to 2
linkage
status word
storage
fd word
procedure returning status
call socket using AF_INET SOCK_STREAM 0 returning fd
display "fd is " fd
call close using fd returning status
|