2021-01-03 12:21:11 -05:00
|
|
|
//
|
|
|
|
// Oops! This program is supposed to print a line like our Hello World
|
|
|
|
// example. But we forgot how to import the Zig Standard Library.
|
|
|
|
//
|
2021-02-07 11:06:51 -05:00
|
|
|
// The @import() function is built into Zig. It returns a value which
|
|
|
|
// represents the imported code. It's a good idea to store the import as
|
|
|
|
// a constant value with the same name as the import:
|
2021-01-03 12:21:11 -05:00
|
|
|
//
|
2021-02-07 11:06:51 -05:00
|
|
|
// const foo = @import("foo");
|
|
|
|
//
|
|
|
|
// Please complete the import below:
|
|
|
|
//
|
|
|
|
|
|
|
|
??? = @import("std");
|
2021-01-03 12:21:11 -05:00
|
|
|
|
|
|
|
pub fn main() void {
|
|
|
|
std.debug.print("Standard Library.\n", .{});
|
|
|
|
}
|
|
|
|
|
2021-02-10 09:27:43 -05:00
|
|
|
// For the curious: Imports must be declared as constants because they
|
|
|
|
// can only be used at compile time rather than run time. Zig evaluates
|
|
|
|
// constant values at compile time. Don't worry, we'll cover imports
|
|
|
|
// in detail later.
|
2021-08-19 11:59:18 -04:00
|
|
|
// Also see this answer: https://stackoverflow.com/a/62567550/695615
|