sapphire/core/io.sp
2022-06-09 17:24:50 +02:00

17 lines
359 B
SourcePawn

let { os } in @'core/os';
let { string } in @'core/string';
let { alloc } in @'core/allocate';
let @out (String str) in {
os.write(1,(i8*)str,string.len(str));
}
let @in : String in {
i8* buffer = cast(i8*,alloc.memalloc(256));
os.read(0,buffer,256);
return (String)buffer;
}
let @outln (String str) in {
out(string.concat(str,'\n'));
}