Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculator -- HELP

Status
Not open for further replies.

GUJUm0deL

Programmer
Jan 16, 2001
3,676
US
How can I make numbers add/subtract/strore in memory/clear memory in a calculator script?? There isn't a way to find out how many times the person will add up tye numbers or multiply the numbers...how do i even start on tha??
Can any1 help me??
 
something like this:

memArray = new Array()

buttonClicked(action)
{
if(action!="=")
{
memArray.push(action);
return action;
}
else
{
str = memArray.join("");
memArray.length = 0;
return eval(str);
}
} jared@eae.net -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top