Mercurial > repo
comparison interps/glass/builtins.diff @ 996:859f9b4339e6
<Gregor> tar xf egobot.tar.xz
author | HackBot |
---|---|
date | Sun, 09 Dec 2012 19:30:08 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
995:6883f5911eb7 | 996:859f9b4339e6 |
---|---|
1 --- builtins.cc 2005-10-24 12:37:51.000000000 -0700 | |
2 +++ /home/razorx/glass-0.11/builtins.cc 2006-07-27 20:01:16.000000000 -0700 | |
3 @@ -72,6 +72,7 @@ | |
4 [l~I.l~] \ | |
5 [c~I.c~] \ | |
6 [e~I.e~] \ | |
7 +[n~I.n~] \ | |
8 } \ | |
9 {(Debug) \ | |
10 [(cl)~Debug.cl~] \ | |
11 @@ -208,6 +209,7 @@ | |
12 sline = line; | |
13 | |
14 mainStack.push_front(new Variable(VAR_STRING, sline)); | |
15 + | |
16 } BUILTIN("I.c", 0) { | |
17 int ic = getchar(); | |
18 string ics; | |
19 @@ -216,6 +218,14 @@ | |
20 ics = ic; | |
21 | |
22 mainStack.push_front(new Variable(VAR_STRING, ics)); | |
23 + | |
24 + } BUILTIN ("I.n", 0) { | |
25 + int in; | |
26 + int inn; | |
27 + scanf ("%d",&in); | |
28 + inn = in; | |
29 + mainStack.push_front(new Variable(VAR_NUMBER, inn)); | |
30 + | |
31 } BUILTIN("I.e", 0) { | |
32 if (feof(stdin) || ferror(stdin)) { | |
33 mainStack.push_front(new Variable(VAR_NUMBER, 1.0)); |