Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
bocce [2015/08/09 18:45]
chris
bocce [2016/01/09 22:22] (current)
chris
Line 36: Line 36:
 #### Debugging macros #### Debugging macros
 Macros can be hard to debug, that's why I include extra debug information when you compile using the `-v` flag (Verbose). Macros can be hard to debug, that's why I include extra debug information when you compile using the `-v` flag (Verbose).
 +
 +### Special Variables
 +Special variables in Bocce are surrounded by `%`, and can be very useful in debugging or describing relative files and paths.
 +
 +Eg,
 +  @Declare TextureResource _resolver.Resolve("​%DIR%/​woodchips.jpg"​)
 +
 +Here are defined special variables:
 +
 +^ Name ^ Description ^
 +| %DIR% | The current path to the source file path/to/ |
 +| %PATH% | The full path to the source file, eg path/​to/​myfile.boo |
 +| %FILENAME% | Just the filename of the file, eg myfile.boo |
 +| %LINE% | The current line number |
 +
 +