<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Den 06-10-2011 00:30, Carlos Avila skrev:
<blockquote
cite="mid:CAFj35FnqaqhTHhhepfhpkYhcqYaVAmXaRe4onmp=2pY_x7e+Ew@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<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>
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>
</body>
</html>