1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

doc: make if debug a bit more clear

This commit is contained in:
Alexander Medvednikov 2022-08-12 05:10:39 +03:00
parent fd83b95d85
commit 09f1eb9ad2

View File

@ -5359,7 +5359,8 @@ fn main() {
If you want an `if` to be evaluated at compile time it must be prefixed with a `$` sign.
Right now it can be used to detect an OS, compiler, platform or compilation options.
`$if debug` is a special option like `$if windows` or `$if x32`.
`$if debug` is a special option like `$if windows` or `$if x32`, it's enabled if the program
is compiled with `v -g` or `v -cg`.
If you're using a custom ifdef, then you do need `$if option ? {}` and compile with`v -d option`.
Full list of builtin options:
| OS | Compilers | Platforms | Other |