in reply to Re: Constructing complex numbers using recursion
in thread Constructing complex numbers using recursion

oh ya, i do use warnings and strict
you guys have yelled at me about that before ;)

checking my code, i do have $real = $constructPolar[0].. my mistake

My code is really really long.. haha..
this is the general idea of what it is doing.. without the stuff I marked as interesting it is working okay. I figured there might be a weird reason i couldn't just do recursion like i was trying to. I don't think it should infinitely loop.. i don't see how it could.. but it doesn't make any sense why it should make my system hang when i try to run/compile it
  • Comment on Re^2: Constructing complex numbers using recursion

Replies are listed 'Best First'.
Re^3: Constructing complex numbers using recursion
by GrandFather (Saint) on Nov 08, 2005 at 04:39 UTC

    Where do $isinPolarForm, $isinRectForm get set?


    Perl is Huffman encoded by design.
      $isinPolarForm are flags

      In the actual program:
      #if value1 is in polar form if(rindex($value1, "_") > 0) { $value1isRectangular = 0; $magnitude1 = substr($value1, 0, index($value1, " ")); $angle1 =substr($value1, (rindex($value1, " ") + 1), length($v +alue1)); #@constructedvalue1Polar = &constructComplex(&PolarToRect($val +ue1)); #$real1 = $constructedvalue1Polar[0]; #$complex1 = $constructedvalue1Polar[2]; }