Mercurial > repo
view interps/glass/builtins.diff @ 1893:2bbb248b7e71
<oerjan> addquote <Sgeo> If that sexy_goats had some sort of namespace, so other things could add their own sexy_goats method to Object or whatever to do something different, I would have no complaint
author | HackBot |
---|---|
date | Wed, 30 Jan 2013 00:22:59 +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));