|
| MAS ETH ARCH/CAAD - 2005/06 - STUDENT PAGES Master of Advanced Studies in Architecture, Specialization in Computer Aided Architectural Design | 065-0005/6 Supervision: Prof. Dr. Ludger Hovestadt, Philipp Schaerer Chair of CAAD, ETH Zurich ~Assignment 04-2 configurator Module 04.1 Calculator Mini Assignment1. click run, on press c, begin btn_c.onRelease = function() { inputcal = ""; } btn_1.onRelease = function() { inputcal = inputcal + "1"; } btn_plus.onRelease = function() { x = inputcal; inputcal = ""; operation = "+"; } btn_result.onRelease = function() { y = inputcal; if (operation == "+") { total = Number((x))+Number((y)); } if (operation == "-") { total = (x)-(y); } if (operation == "*") { total = (x)*(y); } if (operation == "/") { total = (x)/(y); } y = ""; inputcal = total; } -- NDSClaudiaFuhr - 23 Feb 2006
|
This website has been archived and is no longer maintained.