Yes, if you can load the contents on a ByteArray you can use the method:<br><br>array floatAt: position<br><br>It works just fine to read contents written from a C program, and I think it is a bit simpler.<br><br>Cheers.<br>
<br><br>r.<br><br><br><br><div class="gmail_quote">On Wed, Jul 2, 2008 at 12:36 AM, David Finlayson &lt;<a href="mailto:dfinlayson@usgs.gov">dfinlayson@usgs.gov</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks. The following methods work, can they be improved/simplified?<br>
<br>
double<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&quot; returns a double &quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;| n a b |<br>
 &nbsp; &nbsp; &nbsp; &nbsp;a := self uint32.<br>
 &nbsp; &nbsp; &nbsp; &nbsp;b := self uint32.<br>
 &nbsp; &nbsp; &nbsp; &nbsp;n := Float new: 2.<br>
 &nbsp; &nbsp; &nbsp; &nbsp;n at: 1 put: b.<br>
 &nbsp; &nbsp; &nbsp; &nbsp;n at: 2 put: a.<br>
 &nbsp; &nbsp; &nbsp; &nbsp;^n<br>
float<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&quot; returns a float &quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;^Float fromIEEE32Bit: self uint32.<br>
<br>
uint32<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&quot; Answer the next unsigned, 32-bit integer from this little endian<br>
(binary) stream &quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;^ aFileStream nextLittleEndianNumber: 4<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
</blockquote></div><br>