comptime format

This commit is contained in:
agra
2026-02-18 18:57:51 +02:00
parent 383f09a305
commit fbf8a62362
5 changed files with 435 additions and 29 deletions

View File

@@ -1212,5 +1212,16 @@ END;
print("sprite-scale: {}\n", s.scale);
}
// --- Comptime format ---
{
ct_body :: "hello";
ct_msg :: format("say: {} (len={})", ct_body, ct_body.len);
print("{}\n", ct_msg);
ct_num :: 42;
ct_num_msg :: format("n={}", ct_num);
print("{}\n", ct_num_msg);
}
print("=== DONE ===\n");
}