File: testset

package info (click to toggle)
cdecl 2.5-18
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 308 kB
  • sloc: ansic: 3,007; yacc: 1,531; makefile: 116; lex: 75; sh: 34
file content (32 lines) | stat: -rw-r--r-- 1,038 bytes parent folder | download | duplicates (8)
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
help
set options
# test some declarations
declare x as ptr to character
declare x as func(w as ptr to char, y as int) ret ptr to int
declare x as func(ptr to char) ret ptr to int
declare x as func(int) ret ptr to int
declare x as func(ptr to char, int) ret ptr to int
declare x as function (args) returning pointer to int
# test some explain functions
explain char *x
explain int *x()
explain int *x(args)
explain int *x(char *)
explain int *x(char *, int )
explain int *x(char *, int, float)
explain int *x(int )
# test some casts
cast x into ptr to char
cast x into ptr to func ret int
cast x into ptr to func() ret int
cast x into ptr to func(args) ret int
cast x into ptr to func(x as ptr to char, y as int) ret int
cast x into ptr to func(ptr to char) ret int
cast x into ptr to func(ptr to char, int) ret int
cast x into ptr to func(ptr to char, int, float) ret int
# test explaining some casts
explain (char *)x
explain (int (*)())x
explain (int (*)(char *))x
explain (int (*)(char *, int))x
explain (int (*)(char *, int, float))x