forked from ocaml/ocaml
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend ifdef example, with a compile-time getenv.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12655 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
- Loading branch information
1 parent
9d32d89
commit 07a3f52
Showing
4 changed files
with
38 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
include IFDEF(XHOME)(struct | ||
let () = print_endline "Defined!" | ||
end) | ||
(*(struct | ||
(struct | ||
let () = print_endline "Not defined!" | ||
end) | ||
*) | ||
|
||
|
||
let () = | ||
Printf.printf "compiled by user %s in directory %s\n%!" | ||
(GETENV USER) | ||
(GETENV PWD) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters