Merge pull request #1075 from flaviut/inlinedocs
Add some documentations and code examples in system
This commit is contained in:
commit
a690e7b267
71 changed files with 2521 additions and 15 deletions
30
tests/misc/tprep.nim
Normal file
30
tests/misc/tprep.nim
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# Test the features that used to belong to the preprocessor
|
||||
|
||||
import
|
||||
times
|
||||
|
||||
#{.warning: "This is only a test warning!".}
|
||||
|
||||
const
|
||||
case2 = true
|
||||
case3 = true
|
||||
|
||||
when defined(case1):
|
||||
{.hint: "Case 1".}
|
||||
when case3:
|
||||
{.hint: "Case 1.3".}
|
||||
elif case2:
|
||||
{.hint: "Case 2".}
|
||||
when case3:
|
||||
{.hint: "Case 2.3".}
|
||||
elif case3:
|
||||
{.hint: "Case 3".}
|
||||
else:
|
||||
{.hint: "unknown case".}
|
||||
|
||||
var
|
||||
s: string
|
||||
write(stdout, "compiled at " & system.compileDate &
|
||||
" " & compileTime & "\n")
|
||||
echo getDateStr()
|
||||
echo getClockStr()
|
||||
Loading…
Add table
Add a link
Reference in a new issue