PDA

View Full Version : math problem


philspeakman
02-27-2003, 10:25 AM
i used this
var height3 = eval(height2)+eval(inches);
height 2 was a number divided by 12 - that bit worked
as does the input for inches so i assume its an eval problem should i be using some thing else?
Ta
Phil

tost
02-27-2003, 01:28 PM
eval is deprecated code, this is the better, less-code way:

height3 = height2+inches;

if this doesn't work out, add some trace commands to check the values of height2 and inches?
regards
tost

bit-101
02-27-2003, 01:49 PM
eval is not deprecated.

annexion
02-27-2003, 05:21 PM
Just realized that this is a crosspost. In any event, try using Number() around the variables that you are adding.

tost
02-27-2003, 05:43 PM
Originally posted by bit-101
eval is not deprecated.
indeed, my mistake