main returns %void
This commit is contained in:
@@ -4,14 +4,11 @@ import "std.zig";
|
||||
|
||||
// Things to do to make this work:
|
||||
// * var args printing
|
||||
// * %void type
|
||||
// * update std API
|
||||
// * defer
|
||||
// * %return
|
||||
// * %% operator
|
||||
// * make main return %void
|
||||
// * how to reference error values %.Invalid
|
||||
// * cast err type to string
|
||||
// * update std API
|
||||
|
||||
pub %.Invalid;
|
||||
|
||||
|
||||
@@ -2,8 +2,7 @@ export executable "hello";
|
||||
|
||||
import "std.zig";
|
||||
|
||||
pub fn main(args: [][]u8) i32 => {
|
||||
pub fn main(args: [][]u8) %void => {
|
||||
//stderr.print_str("Hello, world!\n");
|
||||
print_str("Hello, world!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ extern {
|
||||
fn printf(__format: &const u8, ...) i32;
|
||||
}
|
||||
|
||||
export fn main(argc: i32, argv: &&u8, env: &&u8) i32 => {
|
||||
export fn main(argc: i32, argv: &&u8) i32 => {
|
||||
printf(c"Hello, world!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user