Clarifies usage of relative-include in guide

This commit is contained in:
Tim Dévé 2019-09-11 18:22:35 +01:00 committed by GitHub
parent a9af4becbf
commit 9bfaa052c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -220,7 +220,7 @@ Sometimes, it's more convenient to bring a module's declarations into scope only
### C Interop
```clojure
(system-include "math.h") ;; compiles to #include <math.h>
(relative-include "math.h") ;; compiles to #include "/full/path/to/file/math.h"
(relative-include "math.h") ;; compiles to #include "$carp_file_dir/math.h" where carp_file_dir is the absolute path to the folder containing the invoking .carp file
(register blah (Fn [Int Int] String)) ;; Will register the function 'blah' that takes two Int:s and returns a String
(register pi Double) ;; Will register the global variable 'pi' of type Double