mirror of
https://codeberg.org/andyscott/ziglings.git
synced 2024-12-22 22:13:11 -05:00
0956f1839f
When I hit 999 exercises, I will finally have reached the ultimate state of soteriological release and no more exercises will be needed. The cycle will be complete. All that will be left is perfect quietude, freedom, and highest happiness.
24 lines
819 B
Zig
24 lines
819 B
Zig
//
|
|
// Oops! This program is supposed to print a line like our Hello World
|
|
// example. But we forgot how to import the Zig Standard Library.
|
|
//
|
|
// 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:
|
|
//
|
|
// const foo = @import("foo");
|
|
//
|
|
// Please complete the import below:
|
|
//
|
|
|
|
??? = @import("std");
|
|
|
|
pub fn main() void {
|
|
std.debug.print("Standard Library.\n", .{});
|
|
}
|
|
|
|
// 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.
|
|
// See also this answer: https://stackoverflow.com/a/62567550/695615
|