Re: aritmetic operators

2002-03-25 Thread Matthew Harrison
i have used $need = param('dif') - $score. i didin't know i could use params in a calc like that. problem solved, cheers On Monday 25 Mar 2002 6:38 pm, Dave Storrs wrote: > Hi Matthew, > > First of all, subtracting scalars is perfectly valid, so the actual error > must be something else. He

Re: aritmetic operators

2002-03-25 Thread Dave Storrs
Hi Matthew, First of all, subtracting scalars is perfectly valid, so the actual error must be something else. Here are three things you should check. 1) First, you don't have a semicolon at the end of that line. 2) Second, if you are operating under 'use strict', you will need to predeclare yo

Re: aritmetic operators

2002-03-24 Thread John W. Krahn
Matthew Harrison wrote: > > I have two scalars created from passed params. i want to create a third > variable by subtracting the two scalars. how can i do this? i have tried: > > $need = $dif - $score > > but i get a 500 server error and my error log says that i cannot use the > '-' operator o

aritmetic operators

2002-03-24 Thread Matthew Harrison
I have two scalars created from passed params. i want to create a third variable by subtracting the two scalars. how can i do this? i have tried: $need = $dif - $score but i get a 500 server error and my error log says that i cannot use the '-' operator on a scalar variable. can anyone suggest