mirror of
https://codeberg.org/andyscott/ziglings.git
synced 2024-12-22 14:03:10 -05:00
fix typos/grammar in 093_hello_c.zig
- output a text -> output text - In Zig -> add comma - result ist -> result is - remove extra whitespace
This commit is contained in:
parent
861bf28e73
commit
20a0fcdd9a
2 changed files with 5 additions and 5 deletions
|
@ -471,7 +471,7 @@ const exercises = [_]Exercise{
|
||||||
},
|
},
|
||||||
.{
|
.{
|
||||||
.main_file = "093_hello_c.zig",
|
.main_file = "093_hello_c.zig",
|
||||||
.output = "Hello C from Zig! - C result ist 17 chars written.",
|
.output = "Hello C from Zig! - C result is 17 chars written.",
|
||||||
.C = true,
|
.C = true,
|
||||||
},
|
},
|
||||||
.{
|
.{
|
||||||
|
|
|
@ -47,9 +47,9 @@ const c = @cImport({
|
||||||
|
|
||||||
pub fn main() void {
|
pub fn main() void {
|
||||||
|
|
||||||
// In order to output a text that can be evaluated by the
|
// In order to output text that can be evaluated by the
|
||||||
// Zig Builder, we need to write it to the Error output.
|
// Zig Builder, we need to write it to the Error output.
|
||||||
// In Zig we do this with "std.debug.print" and in C we can
|
// In Zig, we do this with "std.debug.print" and in C we can
|
||||||
// specify a file descriptor i.e. 2 for error console.
|
// specify a file descriptor i.e. 2 for error console.
|
||||||
//
|
//
|
||||||
// In this exercise we use 'write' to output 17 chars,
|
// In this exercise we use 'write' to output 17 chars,
|
||||||
|
@ -57,7 +57,7 @@ pub fn main() void {
|
||||||
const c_res = write(2, "Hello C from Zig!", 17);
|
const c_res = write(2, "Hello C from Zig!", 17);
|
||||||
|
|
||||||
// let's see what the result from C is:
|
// let's see what the result from C is:
|
||||||
std.debug.print(" - C result ist {d} chars written.\n", .{c_res});
|
std.debug.print(" - C result is {d} chars written.\n", .{c_res});
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// Something must be considered when compiling with C functions.
|
// Something must be considered when compiling with C functions.
|
||||||
|
|
Loading…
Reference in a new issue