<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: get-word code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sun, 05 Oct 2008 23:34:43 GMT</pubDate>
    <description>DZone Snippets: get-word code</description>
    <item>
      <title>enforce lit-word! param</title>
      <link>http://snippets.dzone.com/posts/show/3158</link>
      <description>To enforce passing a lit-word! param, you need to make the param a get-word!, so it isn't evaluated when the func is called. This won't work if you're dynamically creating the param of course.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;incr: func [&lt;br /&gt;    {Increment a value by 1.}&lt;br /&gt;    :word [lit-word!]&lt;br /&gt;    /by {Change by this amount}     ; /skip ?&lt;br /&gt;        value&lt;br /&gt;][&lt;br /&gt;    set word add get word any [value 1]&lt;br /&gt;]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;;&gt;&gt; a: 0&lt;br /&gt;;== 0&lt;br /&gt;;&gt;&gt; incr a&lt;br /&gt;;** Script Error: incr expected word argument of type: ;lit-word&lt;br /&gt;;** Near: incr a&lt;br /&gt;;&gt;&gt; incr 'a&lt;br /&gt;;== 1&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Sat, 16 Dec 2006 03:15:51 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3158</guid>
      <author>gregg.irwin (Gregg Irwin)</author>
    </item>
  </channel>
</rss>
