<div dir="ltr">
<br><br><div class="gmail_quote">On Wed, Feb 2, 2011 at 11:18, Amit Bueno <span dir="ltr"><<a href="mailto:amitbueno@gmail.com">amitbueno@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I am compiling in a delphi mode.<br>
Sorry for not posting a runnable source code,.<br>
The code portion was taken from a huge source code, which is probably hard<br>
to detach from the rest of the code.<br>
It is reading a TStream object, which is an input 3ds file given to the app.<br></blockquote><div><br>Can you write a small proof of concept that does exactly the same thing with the problem ?<br><br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
---<br>
<font color="#888888">Amit<br>
</font><div class="im"><br>
-----Original Message-----<br>
From: <a href="mailto:fpc-pascal-bounces@lists.freepascal.org">fpc-pascal-bounces@lists.freepascal.org</a><br>
</div><div class="im">[mailto:<a href="mailto:fpc-pascal-bounces@lists.freepascal.org">fpc-pascal-bounces@lists.freepascal.org</a>] On Behalf Of Jonas Maebe<br>
Sent: Wednesday, February 02, 2011 11:17 AM<br>
To: FPC-Pascal users discussions<br>
</div><div class="im">Subject: Re: [fpc-pascal] dynamic array and new/dispose<br>
<br>
<br>
</div><div><div></div><div class="h5">On 02 Feb 2011, at 09:20, Amit Bueno wrote:<br>
<br>
> // creating and reading more data<br>
> SubChunks[NewSubChunk]^.read(Fl);<br>
><br>
> // NewSubChunk function<br>
> Function Chunk.NewSubchunk: integer;<br>
> begin<br>
> setlength(SubChunks, High(SubChunks)+2);<br>
> New(subchunks[High(SubChunks)], create);<br>
> SubChunks[High(SubChunks)]^.Data := Self.Data;<br>
> Result := High(SubChunks);<br>
> end;<br>
><br>
> // ---------<br>
> The procedure fails when running the:<br>
> SubChunks[NewSubChunk]^.read(Fl);<br>
><br>
> All the procedure works fine on Delphi, but on fpc under iMac it<br>
> fails.<br>
> Why?<br>
><br>
<br>
Are you compiling in Delphi mode? Please *always* post compilable<br>
source code that demonstrates the problem when asking for help, not<br>
uncompilable snippets. Don't make people guess about what you might<br>
have written or about how you are compiling it.<br>
<br>
<br>
Jonas<br>
_______________________________________________<br>
fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/mailman/listinfo/fpc-pascal</a><br>
<br>
_______________________________________________<br>
fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/mailman/listinfo/fpc-pascal</a><br>
</div></div></blockquote></div><br><br>Ido<br clear="all">LINESIP - Opening the source for communication<br><a href="http://www.linesip.com/" target="_blank">http://www.linesip.com</a><br><a href="http://www.linesip.co.il/" target="_blank">http://www.linesip.co.il</a><br>
<br></div>