mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-10-28 19:00:52 +08:00
92 lines
1.9 KiB
Plaintext
92 lines
1.9 KiB
Plaintext
#exe {
|
|
-Mroot=main.zig
|
|
#}
|
|
|
|
#write main.zig {
|
|
const std = @import("std");
|
|
pub fn main() !void {
|
|
try std.Io.File.stdout().writeStreamingAll(io, foo);
|
|
}
|
|
const foo = "good morning\n";
|
|
const io = std.Io.Threaded.global_single_threaded.io();
|
|
#}
|
|
#update
|
|
#check stdout {
|
|
good morning
|
|
#}
|
|
|
|
#write main.zig {
|
|
const std = @import("std");
|
|
pub fn main() !void {
|
|
try std.Io.File.stdout().writeStreamingAll(io, foo);
|
|
}
|
|
const foo = "good morning\n";
|
|
const bar = "good evening\n";
|
|
const io = std.Io.Threaded.global_single_threaded.io();
|
|
#}
|
|
#update {
|
|
add new declaration#}
|
|
#check stdout {
|
|
good morning
|
|
#}
|
|
|
|
#write main.zig {
|
|
const std = @import("std");
|
|
pub fn main() !void {
|
|
try std.Io.File.stdout().writeStreamingAll(io, bar);
|
|
}
|
|
const foo = "good morning\n";
|
|
const bar = "good evening\n";
|
|
const io = std.Io.Threaded.global_single_threaded.io();
|
|
#}
|
|
#update {
|
|
reference new declaration#}
|
|
#check stdout {
|
|
good evening
|
|
#}
|
|
|
|
#write main.zig {
|
|
const std = @import("std");
|
|
pub fn main() !void {
|
|
try std.Io.File.stdout().writeStreamingAll(io, qux);
|
|
}
|
|
const foo = "good morning\n";
|
|
const bar = "good evening\n";
|
|
const io = std.Io.Threaded.global_single_threaded.io();
|
|
#}
|
|
#update {
|
|
reference missing declaration#}
|
|
#check errors {
|
|
main.zig:3:52: error: use of undeclared identifier 'qux'
|
|
#}
|
|
|
|
#write main.zig {
|
|
const std = @import("std");
|
|
pub fn main() !void {
|
|
try std.Io.File.stdout().writeStreamingAll(io, qux);
|
|
}
|
|
const foo = "good morning\n";
|
|
const bar = "good evening\n";
|
|
const qux = "good night\n";
|
|
const io = std.Io.Threaded.global_single_threaded.io();
|
|
#}
|
|
#update {
|
|
add missing declaration#}
|
|
#check stdout {
|
|
good night
|
|
#}
|
|
|
|
#write main.zig {
|
|
const std = @import("std");
|
|
pub fn main() !void {
|
|
try std.Io.File.stdout().writeStreamingAll(io, qux);
|
|
}
|
|
const qux = "good night\n";
|
|
const io = std.Io.Threaded.global_single_threaded.io();
|
|
#}
|
|
#update {
|
|
remove unused declarations#}
|
|
#check stdout {
|
|
good night
|
|
#}
|