]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/interpolate/interpolate-docs.factor
interpolate: number stack arguments from top of stack.
[factor.git] / basis / interpolate / interpolate-docs.factor
index 768b2e9025e78b9f059d560fdba98ddff1b94aec..1f731ec05805a01b9d9a7234840521b5faa7589e 100644 (file)
@@ -4,10 +4,11 @@ IN: interpolate
 HELP: interpolate
 { $values { "str" string } }
 { $description "String interpolation using named variables and/or stack arguments, writing to the " { $link output-stream } "." }
+{ $notes "Stack arguments are numbered from the top of the stack." }
 { $examples
     { $example
         "USING: interpolate ;"
-        "\"Bob\" \"Alice\" \"Hi ${0}, it's ${1}.\" interpolate"
+        "\"Bob\" \"Alice\" \"Hi ${1}, it's ${0}.\" interpolate"
         "Hi Bob, it's Alice."
     }
     { $example
@@ -19,6 +20,7 @@ HELP: interpolate
 
 HELP: interpolate>string
 { $values { "str" string } { "newstr" string } }
-{ $description "String interpolation using named variables and/or stack arguments, captured as a " { $link string } "." } ;
+{ $description "String interpolation using named variables and/or stack arguments, captured as a " { $link string } "." }
+{ $notes "Stack arguments are numbered from the top of the stack." } ;
 
 { interpolate interpolate>string } related-words