Results 1 to 3 of 3

Thread: Complex Numbers (Using Units)?

  1. #1
    Join Date
    Jun 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Complex Numbers (Using Units)?

    I am new to Simba, SRL, Free Pascal, and this forum, so I hope this is the correct section for my post.

    I was searching google and found a unit for Free Pascal called ucomplex which should work for what I need, but I am not sure how to include it into my script. I know I could just write my own class which holds both real and imaginary parts of the number and overload the operators. In fact, this site explains it very well, but my question concerns including these units into my script.

    http://wiki.freepascal.org/Unit_categorization

    I have tried this script but it fails to compile on the "uses UCOMPLEX" line:

    Code:
    program CmplxDemo;
       uses UCOMPLEX;
         var
           z: Complex;
         begin
           z := Cmplx (13, 37)  { z := x + iy }
    end.

  2. #2
    Join Date
    Dec 2011
    Location
    Toronto, Ontario
    Posts
    6,424
    Mentioned
    84 Post(s)
    Quoted
    863 Post(s)

    Default

    It looks similar to a TPoint.

  3. #3
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Copy all your unit stuff into a .Simba file. do {$I LocationOfSimbaFile.Simba}

    edit anything that may need converting to compile.

    How in the world does this look like TPoints.. -__-
    I am Ggzz..
    Hackintosher

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •