source: project/wiki/users/peter-danenberg @ 27247

Last change on this file since 27247 was 27247, checked in by svnwiki, 9 years ago

Anonymous wiki edit for IP [24.205.81.111]:

File size: 863 bytes
Line 
1[[toc:]]
2
3== Sandbox
4
5I'm playing around with svnwiki syntax so we can do something reasonable with [[/egg/cock|cock's]] svnwiki driver.
6
7=== {{debug?}}
8<parameter>debug? → #f</parameter>
9Should we print debugging information to {{stdout}}? See [[debug-print|{{debug-print}}]].
10<enscript highlight="scheme">
11(define debug? (make-parameter #t))
12</enscript>
13
14=== {{debug-print}}
15<procedure>(debug-print key value) → unspecified</procedure>
16<procedure>(debug-print key value out) → unspecified</procedure>
17Print key-value pairs if the parameter [[#debug|{{debug?}}]] is true.
18
19; key : The key to print
20; value : The value to print
21; out : The port whereto to print
22
23<enscript highlight="scheme">
24(define debug-print
25  (case-lambda
26    ((key value) (debug-print key value #t))
27    ((key value out) (if (debug?) (format out "~a: ~a~%" key value)))))
28</enscript>
Note: See TracBrowser for help on using the repository browser.