Something went wrong. Try again.
Jam Programming Language jamlang.org
compiler
Something went wrong. Try again.
12345678910111213141516171819202122// Helper for test_xmod_consts — mod_const_b defines same-named consts// with different values. Module consts live in a per-module namespace:// each body (and each comptime fold, like the array length below) must// read ITS module's values.pub const N: u32 = 4;comp const SIZE = 3;
pub fn readN() u32 { return N;}
pub fn lastSlot() u8 { var buf: [SIZE]u8 = [0; SIZE]; buf[SIZE - 1] = 42; return buf[SIZE - 1];}
pub fn sizeOfBuf() u64 { var buf: [SIZE]u8 = [0; SIZE]; return @sizeOf([SIZE]u8);}