Zig has no preprocessor (good!)... __FILE__, __LINE__?

The C preprozessor knows the “macros” FILE_, __LINE__and such.

What is the ziggy equivalent of those?

Cheers!
Tuxic

There is the builtin function @src(), which returns a struct with the relevant information.

3 Likes

Hi Lena,

Thanks a lot! :slight_smile: As a total newbie to Zig, I still have to collect the bits to create my first bytes in Zig.

Cheers!
tuxic

2 Likes