baseportal
Start

baseportal message board

Welcome to the baseportal message board...

Please read the FAQ.

 
 Selected message: To the list 
    Message from Randy M. on 12/19 2003, 14:57 +00:00

    arithmetic operators


      how to display only the varible of $sumtotal in the following:

      (Variables on right of = have a loop that gives an assigned numerical value to each varible)

      this is what was tried, but it does not display

      $sumtotal

      <code=perl>
      $sumtotal=($sum+$sumram+sumdj+$sumtg+sumtp);
      out $sumtotal
      </perl>

      following is complete code from page
      http://baseportal.com/cgi-bin/baseportal.pl?htx=/searsdvdtech/RM_Copy

      <i> Completes</i> <br>


      <loop db^=PRODUCTION Name==RM sort=- date==now code=perl>;

      $sum+=$_loop{Complete};
      </loop>
      RM =$sum

      <loop db^=PRODUCTION Name==RAM sort=- date==now code=perl>;

      $sumram+=$_loop{Complete};
      </loop>
      RAM =$sumram


      <loop db^=PRODUCTION Name==DJ sort=- date==now code=perl>;

      $sumdj+=$_loop{Complete};
      </loop>DJ =$sumdj

      <loop db^=PRODUCTION Name==TP sort=- date==now code=perl>;

      $sumtp+=$_loop{Complete};
      </loop>TP =$sumtp

      <loop db^=PRODUCTION Name==TG sort=- date==now code=perl>;

      $sumtg+=$_loop{Complete};
      </loop>TG =$sumtg


      <code=perl>
      $sumtotal=($sum+$sumram+sumdj+$sumtg+sumtp);
      out $sumtotal
      </perl>

    Your reply:

    Name: EMail: WWW:
    Subject:
    Text:
    Timezone:

    Post a new message


 All messages from this thread: To the list 
    Message from Randy M on 12/19 2003, 15:33 +00:00

    figured it out.


      <perl>
      {$sumtotal=($sum+$sumram+$sumdj+$sumtg+$sumtp);

      out "total =$sumtotal";
      }
      </perl>

     Post a reply

 Messages from 2850 to 3000: To the input form 
<< Newest messages | < Newer messages | To the input form | Older messages > | Oldest messages >>


Back to the homepage

© baseportal.com. All rights reserved. Terms of use



baseportal.com