testing stuff
This commit is contained in:
parent
d1b04c13d1
commit
e0c772db92
6 changed files with 199 additions and 8 deletions
40
main.zig
Normal file
40
main.zig
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue