On Jan 4, 2011, at 11:18 AM, John Whittaker wrote:

> I have been able to figure out how to read a large block of these into a
> big byte array (128 K).  What I would next like to do is somehow iterate
> over this byte-array and create a sequence of event-entry structures.
> Unfortunately I cannot figure out how to do this.  I have been able to
> create a single instance of an event-entry using memory>struct with the
> 128 K byte-array.

You want to create a specialized array of event-entry structs over your 
byte-array. Create a specialized-array instance for your struct type as follows:

--
USE: specialized-arrays
SPECIALIZED-ARRAY: event-entry
--

Then use the generated word «event-entry-array-cast» to wrap your byte-array in 
an event-entry-array. You can then iterate over the event-entry-array as a 
Factor sequence. For more information on specialized arrays, use 
«"specialized-array" help» to bring up the documentation.

-Joe
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to