]> gitweb.factorcode.org Git - factor.git/commitdiff
db.tuples, timers: few $unchecked-examples turn into $codes
authorKeita Haga <keitahaga@mail.com>
Sat, 8 Jan 2011 13:31:07 +0000 (22:31 +0900)
committerKeita Haga <keitahaga@mail.com>
Sat, 8 Jan 2011 13:31:07 +0000 (22:31 +0900)
basis/db/tuples/tuples-docs.factor
basis/timers/timers-docs.factor

index 8a9e6ba2b6035f8c3e1efb81fc95788acded2daa..36e6b4bf2cd4e3c4cc8b59965fe723cab049a2b6 100644 (file)
@@ -70,14 +70,13 @@ HELP: define-persistent
     { "the name of a database column that maps to the slot" }        { "a database type (see " { $link "db.types" } ")" }
 } "Throws an error if the slot name (column one from each row) is not a slot in the tuple or its superclases." }
 { $examples
-    { $unchecked-example "USING: db.tuples db.types ;"
+    { $code "USING: db.tuples db.types ;"
         "TUPLE: boat id year name ;"
         "boat \"BOAT\" {"
         "    { \"id\" \"ID\" +db-assigned-id+ }"
         "    { \"year\" \"YEAR\" INTEGER }"
         "    { \"name\" \"NAME\" TEXT }"
         "} define-persistent"
-        ""
     }
 } ;
 
index f3a3e4437b5b646ff95727e0ced3d4a2756d2ab3..9a9b29cbf3c46258e85c46aacd1966a1cfcff724 100644 (file)
@@ -22,10 +22,9 @@ HELP: every
      { "timer" timer } }\r
 { $description "Creates a timer that calls the quotation repeatedly, using " { $snippet "duration" } " as the frequency. The first call of " { $snippet "quot" } " will happen immediately. If the quotation throws an exception, the timer will stop." }\r
 { $examples\r
-    { $unchecked-example\r
+    { $code\r
         "USING: timers io calendar ;"\r
         """[ "Hi Buddy." print flush ] 10 seconds every drop"""\r
-        ""\r
     }\r
 } ;\r
 \r
@@ -33,10 +32,9 @@ HELP: later
 { $values { "quot" quotation } { "delay-duration" duration } { "timer" timer } }\r
 { $description "Sleeps for " { $snippet "duration" } " and then calls a " { $snippet "quot" } ". The user may cancel the timer before " { $snippet "quot" } " runs. This timer is not repeated." }\r
 { $examples\r
-    { $unchecked-example\r
+    { $code\r
         "USING: timers io calendar ;"\r
         """[ "Break's over!" print flush ] 15 minutes later drop"""\r
-        ""\r
     }\r
 } ;\r
 \r
@@ -46,10 +44,9 @@ HELP: delayed-every
      { "timer" timer } }\r
 { $description "Creates a timer that calls " { $snippet "quot" } " repeatedly, waiting " { $snippet "duration" } " before calling " { $snippet "quot" } " the first time and then waiting " { $snippet "duration" } " between further calls. If the quotation throws an exception, the timer will stop." }\r
 { $examples\r
-    { $unchecked-example\r
+    { $code\r
         "USING: timers io calendar ;"\r
         """[ "Hi Buddy." print flush ] 10 seconds every drop"""\r
-        ""\r
     }\r
 } ;\r
 \r