# Comptime \[runtime value\]

**URL:** <https://ziggit.dev/t/comptime-runtime-value/18272>\
**Category:** Help\
**Tags:** language, compiler\
**Created:** [November 8, 2026, 12:54pm UTC](https://ziggit.dev/t/comptime-runtime-value/18272 "2026-11-08T12:54:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jiaming00](https://ziggit.dev/user_avatar/ziggit.dev/jiaming00/32/10106_2.png) [@Jiaming00](https://ziggit.dev/u/Jiaming00)\
**Post date:** [November 8, 2026, 12:54pm UTC](https://ziggit.dev/t/comptime-runtime-value/18272/1 "2026-11-08T12:54:22Z")

</div>

## Compile Log Output: @as(u8, [runtime value])

I would like to know under what circumstances using `@comptimeLog` to output condition-related values that trigger `@comptimeError` will display `[runtime value]`. I am confused because the code block containing `@comptimeError` is determined by an `if` condition based on the value being logged.

---

<div class="post-metadata">

**Author:** ![tholmes](https://ziggit.dev/user_avatar/ziggit.dev/tholmes/32/5641_2.png) [@tholmes](https://ziggit.dev/u/tholmes)\
**Post date:** [November 8, 2026, 1:15pm UTC](https://ziggit.dev/t/comptime-runtime-value/18272/2 "2026-11-08T13:15:56Z")

</div>

- Any `var` will display `[runtime value]`
- However, you’re still able to use `@compileError()` and `@compileLog()` inside a block comparing the value with something - that is, as long as the thing you’re comparing it to is comptime-known
- E.g. since the `0` in `if(i == 0)` is comptime-known, the compiler is aware that it can branch off the code at comptime here, but because of semantics it has to pretend it’s not actually aware what `i`’s value is, even though we just asserted that it’s exactly 0
