]> gitweb.factorcode.org Git - factor.git/commitdiff
fjsc: add '.' word
authorchris.double <chris.double@double.co.nz>
Mon, 11 Dec 2006 13:59:23 +0000 (13:59 +0000)
committerchris.double <chris.double@double.co.nz>
Mon, 11 Dec 2006 13:59:23 +0000 (13:59 +0000)
apps/furnace-fjsc/resources/bootstrap.js

index ac8bb1e755c7cdc02ea8addc18624eeb2ec70683..b791a911293a60ca0aa1ba832b7991949987a694 100644 (file)
@@ -9,6 +9,7 @@ function Factor() {
     "-": function() { self.fjsc_minus(); },
     "*": function() { self.fjsc_times(); },
     "/": function() { self.fjsc_divide(); },
+    ".": function() { self.fjsc_dot(); },
     alert: function() { self.fjsc_alert(); }
   };  
 }
@@ -87,6 +88,10 @@ Factor.prototype.fjsc_divide = function() {
   stack.push(v2/v1);
 }
 
+Factor.prototype.fjsc_dot = function() {
+  alert(this.data_stack.pop());
+}
+
 Factor.prototype.fjsc_alert = function() {
   alert(this.data_stack.pop());
 }