Skip to content

Instantly share code, notes, and snippets.

@Urquelle
Last active February 9, 2019 21:28
Show Gist options
  • Select an option

  • Save Urquelle/ce289ab5613cbbed90c6ccb70e1f41fc to your computer and use it in GitHub Desktop.

Select an option

Save Urquelle/ce289ab5613cbbed90c6ccb70e1f41fc to your computer and use it in GitHub Desktop.
a :: () {
}
b :: ( x: u32 ) -> string {
}
_x5 : u64 = ( 5 + 3 ) * -5 - 7 + 4;
zonk : [] * Zipp;
s, t : [10*5] * Zipp;
@use_me
x_const :: 10+4;
New_Type :: u32;
@main
func :: (x: u64, using y: *f32, z: (a: u8, f64) -> return_code: bool, s8 ) -> status_code: f32, data: Zonk {
using Y_Enum;
fib(i = 10, j = "fuzzle", true);
zip(x, y);
y_val := <<y;
@profile
/* anonymer block */ {
weiss := { 1.0, 1, 1, 1 };
}
lokaler_struct :: struct {
using y : Y_Enum;
x : u32 = 10;
}
/* lokale prozedur */
local_proc :: (r: f32, g: f32, b: f32, a: f32 = 1.0) {
return { r, g, b, a };
}
/* ich bin ein /* verschachtelter kommentar */ */
@optimize_me
if !(a <= b) && c != d {
return test();
} else if a > b {
return foo();
}
foo := 15;
hel : string = "test string";
abc = x.length.cm;
abc = (3 + 5).to_string();
@dynamic_range
for 0..10 {
for i : 0..x {
print("bla");
}
}
s[5] = "yolo";
while x < 50 {
x.length += 1;
if x.length > 12 {
break;
} else {
return 235;
}
}
switch bla {
case 'a': {
print("a");
} break;
case 'b': {
print("b");
} break;
case "yankee": {
print("yankee");
} break;
default: {
print("default");
}
}
z := { 5, cast(u64)x, "bla" };
}
X_Struct :: struct {
x : u64;
y : u64;
z : u64;
}
Y_Enum :: enum {
A :: 0;
B;
C;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment