From b3080178c6d07718c24f1a03c85c5d8f48d67023 Mon Sep 17 00:00:00 2001 From: Philipp Winkler Date: Mon, 23 Mar 2009 12:39:03 -0700 Subject: [PATCH] Add a missing step to the tutorial. --- basis/help/tutorial/tutorial.factor | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/basis/help/tutorial/tutorial.factor b/basis/help/tutorial/tutorial.factor index 7ec155881b..26812947c0 100644 --- a/basis/help/tutorial/tutorial.factor +++ b/basis/help/tutorial/tutorial.factor @@ -62,7 +62,9 @@ ARTICLE: "first-program-test" "Testing your first program" "" ": palindrome? ( str -- ? ) dup reverse = ;" } -"We will now test our new word in the listener. First, push a string on the stack:" +"We will now test our new word in the listener. First we have add the palindrome vocabulary to the listener's vocabulary search path:" +{ $code "USE: palindrome"} +"Next, push a string on the stack:" { $code "\"hello\"" } "Note that the stack display in the listener now shows this string. Having supplied the input, we call our word:" { $code "palindrome?" } @@ -132,6 +134,8 @@ $nl $nl "We modify " { $snippet "palindrome?" } " to first apply " { $snippet "normalize" } " to its input:" { $code ": palindrome? ( str -- ? ) normalize dup reverse = ;" } +"Factor compiles the file from the top down. So, be sure to place the definition for " { $snippet "normalize" } " above the definition for " { $snippet "palindrome?" } "." +$nl "Now if you press " { $command tool "common" refresh-all } ", the source file should reload without any errors. You can run unit tests again, and this time, they will all pass:" { $code "\"palindrome\" test" } ;