Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 02-27-2003, 10:25 AM   #1
philspeakman
Goatboy
 
philspeakman's Avatar
 
Join Date: Feb 2002
Location: Liverpool
Posts: 136
Default math problem

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
philspeakman is offline   Reply With Quote
Old 02-27-2003, 01:28 PM   #2
tost
my pleasure
 
tost's Avatar
 
Join Date: Apr 2002
Location: gent.be
Posts: 792
Default

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
tost is offline   Reply With Quote
Old 02-27-2003, 01:49 PM   #3
bit-101
Registered User
 
Join Date: Feb 2003
Location: In the matrix.
Posts: 78
Default

eval is not deprecated.
bit-101 is offline   Reply With Quote
Old 02-27-2003, 05:21 PM   #4
annexion
I make out with chicks
 
Join Date: Oct 2002
Location: NYC
Posts: 1,586
Default

Just realized that this is a crosspost. In any event, try using Number() around the variables that you are adding.
__________________
www.perpetuated.com
annexion is offline   Reply With Quote
Old 02-27-2003, 05:43 PM   #5
tost
my pleasure
 
tost's Avatar
 
Join Date: Apr 2002
Location: gent.be
Posts: 792
Default

Quote:
Originally posted by bit-101
eval is not deprecated.
indeed, my mistake
tost is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:16 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.