18 lines
310 B
Common Lisp
18 lines
310 B
Common Lisp
fn draw_rect(x: i64, y: i64, w: i64, h: i64) -> i64 {
|
||
print_i64(x);
|
||
print_i64(y);
|
||
print_i64(w);
|
||
print_i64(h);
|
||
return 0;
|
||
}
|
||
|
||
fn main() -> i64 {
|
||
// 位置参数
|
||
draw_rect(0, 0, 100, 200);
|
||
|
||
// 命名参数(任意顺序)
|
||
draw_rect(w: 10, h: 20, x: 1, y: 2);
|
||
|
||
return 0;
|
||
}
|