<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: sparse-rec code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Thu, 21 Aug 2008 09:20:39 GMT</pubDate>
    <description>DZone Snippets: sparse-rec code</description>
    <item>
      <title>sparse-rec-to-fixed-block</title>
      <link>http://snippets.dzone.com/posts/show/3018</link>
      <description>&lt;code&gt;&lt;br /&gt;	sparse-rec-to-fixed-block: func [&lt;br /&gt;		rec [block!]&lt;br /&gt;		col-names [block!] "All column names in full schema"&lt;br /&gt;	][&lt;br /&gt;		if not all-words? col-names [alert join "sparse-rec-to-fixed-block: col-names has non-word values: " mold col-names]&lt;br /&gt;		collect/only val [&lt;br /&gt;			foreach name col-names [&lt;br /&gt;				val: attempt [first select/skip rec name 2]&lt;br /&gt;			]&lt;br /&gt;		]&lt;br /&gt;	]&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Sun, 19 Nov 2006 02:22:05 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3018</guid>
      <author>gregg.irwin (Gregg Irwin)</author>
    </item>
    <item>
      <title>sparse-rec?</title>
      <link>http://snippets.dzone.com/posts/show/3017</link>
      <description>&lt;code&gt;&lt;br /&gt;	; Like named-fields?, this func can't guarantee that a record is really&lt;br /&gt;	; a sparse rec; it can only tell us if it's not.&lt;br /&gt;	sparse-rec?: func [&lt;br /&gt;		rec [block!]&lt;br /&gt;		col-names [block!] "All column names in full schema"&lt;br /&gt;	][&lt;br /&gt;		if not all-words? col-names [alert join "sparse-rec?: col-names has non-word values: " mold col-names]&lt;br /&gt;		all [&lt;br /&gt;			named-fields? rec&lt;br /&gt;			(length? rec) &lt;&gt; (2 * length? col-names) &lt;br /&gt;		]&lt;br /&gt;	]&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Sun, 19 Nov 2006 02:17:56 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3017</guid>
      <author>gregg.irwin (Gregg Irwin)</author>
    </item>
  </channel>
</rss>
