aboutsummaryrefslogtreecommitdiff
path: root/examples/hello.prs
blob: 4ba371aa587230f7b2f6a4dbeb52c999511f31cd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
* hello world example

public function main
    globals
        myptr pointer to int
    types
        socket prototype
            linkage
                fd int
            procedure returning fd

        vfprintf prototype
            procedure

        myalias alias int
    procedure
        display "socket=" socket etc
        display ", vfprintf=" vfprintf
        display "this is a string"
        display cast "this is a string" to pointer to void