40 lines
1,019 B
Zig
40 lines
1,019 B
Zig
const std = @import("std");
|
|
pub fn main(init: std.process.Init) !void {
|
|
const xdxdx = try std.Io.Dir.readFileAlloc(std.Io.Dir.cwd(), init.io, "main.zig", init.gpa, .unlimited);
|
|
defer init.gpa.free(xdxdx);
|
|
std.debug.print("morbius {s} {s}\n", .{xdxdx, "morbius"});
|
|
switch (f(.blub)) {
|
|
.hop => {},
|
|
.jobb => {},
|
|
}
|
|
const heee = h();
|
|
std.debug.print("{any}\n", .{heee});
|
|
var huhhh: std.ArrayList(u18) = .empty;
|
|
defer huhhh.deinit(init.gpa);
|
|
try huhhh.append(init.gpa, 3333);
|
|
const Vec3 = @Vector(3, u4);
|
|
const a: Vec3 = .{3, 4, 5};
|
|
//const b: Vec3 = .{3, 4, 5};
|
|
std.debug.print("{any}", .{@reduce(.Add, a)});
|
|
//inline for (.{Gloob {}, Gleeeb {}}) |v| {
|
|
// v.morbiusss();
|
|
//}
|
|
}
|
|
|
|
//const Gloob = struct {
|
|
// fn morbiusss( self: @This ) void {
|
|
// }
|
|
//};
|
|
const Gleeeb = struct {
|
|
fn morbiusss() void {
|
|
}
|
|
};
|
|
|
|
fn h() [4]u8 {
|
|
return .{3,4,2,1};
|
|
}
|
|
|
|
fn f(x: enum { glob, blub }) enum { hop, jobb } {
|
|
_ = x;
|
|
return .jobb;
|
|
}
|