view interps/glass/builtins.diff @ 7408:4315d5bac235

<b_jonas> slashlearn Ravnica/Ravnica: City of Guilds is a city of guilds. \xe2\x80\x9cCity of Guilds\xe2\x80\x9d is part of its name. The Wizards of the Coast Marketing Department: We Sell Anything thought players might not notice it was a City of Guilds unless they put the tagline into the name.
author HackBot
date Sun, 17 Apr 2016 19:29:52 +0000
parents 859f9b4339e6
children
line wrap: on
line source

--- builtins.cc	2005-10-24 12:37:51.000000000 -0700
+++ /home/razorx/glass-0.11/builtins.cc	2006-07-27 20:01:16.000000000 -0700
@@ -72,6 +72,7 @@
 [l~I.l~] \
 [c~I.c~] \
 [e~I.e~] \
+[n~I.n~] \
 } \
 {(Debug) \
 [(cl)~Debug.cl~] \
@@ -208,6 +209,7 @@
         sline = line;
         
         mainStack.push_front(new Variable(VAR_STRING, sline));
+
     } BUILTIN("I.c", 0) {
         int ic = getchar();
         string ics;
@@ -216,6 +218,14 @@
         ics = ic;
         
         mainStack.push_front(new Variable(VAR_STRING, ics));
+
+    } BUILTIN ("I.n", 0) {
+        int in;
+        int inn;
+        scanf ("%d",&in);
+        inn = in;
+        mainStack.push_front(new Variable(VAR_NUMBER, inn));
+
     } BUILTIN("I.e", 0) {
         if (feof(stdin) || ferror(stdin)) {
             mainStack.push_front(new Variable(VAR_NUMBER, 1.0));