Thanks! I recently downloaded the rtl source code, and confirmed this<br><br><div class="gmail_quote">2011/10/5 Jeppe Gręsdal Johansen <span dir="ltr"><<a href="mailto:jjohan07@student.aau.dk">jjohan07@student.aau.dk</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div bgcolor="#FFFFFF" text="#000000">
Den 06-10-2011 00:30, Carlos Avila skrev:
<div><div class="h5"><blockquote type="cite">
<div>Hello<br>
</div>
<div>Is complex number arithmetic possible in FPC? Another post
recommends use unit so named ucomplex, but i can't find any
detailed information of this in the documentation. But,
amazingly, i sucessfully probed this small program:</div>
<div><br>
</div>
<div>PROGRAM DUMMY;<br>
<br>
USES UCOMPLEX;<br>
<br>
VAR<br>
<br>
x,y, z, w: COMPLEX;<br>
<br>
BEGIN<br>
x := 8+i*7;<br>
y := 4-5*i;<br>
z := x+y;<br>
w := x*y<br>
<br>
END.<br>
</div>
<div><br>
</div>
<div>This program compile and run right, but why? I need to know
about anything subroutines that works with complex numbers. It
is posibble to write math operations like FORTRAN?</div>
<div><br>
</div>
<div>Thanks</div>
</blockquote></div></div>
The unit ucomplex is part of the rtl. It uses simple operator
overloading to add a pretty useful complex type into your program.
You can use it(pretty much) as any other type. It's not any special
type, it's just a record where all the operators got overloaded<br>
<br>
Try to open the source code for that unit, and you'll see how
beautifully simple it is :)<br>
</div>
<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></blockquote></div><br>