Knowledge

eval

Source đź“ť

1881:. Its flavor of Eval supports only expression evaluation, where the expression may include user-defined functions and objects (but not user-defined variable names). Of note, the evaluator is different from VBS, and invocation of certain user-defined functions may work differently in VBA than the identical code in VBScript. 1842:
and use properties of the context object. However, it is still limited to only understanding the most basic types, so if you have a function that returns a Dictionary or MySpiffyObject, RBScript will be unable to use it. You can also communicate with your RBScript through the Print and Input events.
2207:
Cmdlet serves the same purpose as the eval function in programming languages like JavaScript, PHP and Python. The Cmdlet runs any Windows PowerShell expression that is provided as a command parameter in the form of a string and outputs the result of the specified expression. Usually, the output of
1865:
are available to developers of compiled Windows applications (written in languages which do not support Eval) through an ActiveX control called the Microsoft Script Control, whose Eval method can be called by application code. To support calling of user-defined functions, one must first initialize
1841:
which can execute REALbasic code at runtime. RBScript is very sandboxed—only the most core language features are there, and you have to allow it access to things you want it to have. You can optionally assign an object to the context property. This allows for the code in RBScript to call functions
338:
cannot be used to evaluate arbitrary expressions. According to the Flash 8 documentation, its usage is limited to expressions which represent "the name of a variable, property, object, or movie clip to retrieve. This parameter can be either a String or a direct reference to the object instance."
1107:
operator takes an operand — if it is a simple literal it pushes it back on the stack. If one takes a string containing a PostScript expression however, one can convert the string to an executable which then can be executed by the interpreter, for example:
692:
function is something of a hybrid between an expression evaluator and a statement executor. It returns the result of the last expression evaluated (all statements are expressions in Perl programming), and allows the final semicolon to be left off.
1514:" had been written directly instead of mixed in. The argument to mixin doesn't need to be a string literal, but arbitrary expressions resulting in a string value, including function calls, that can be evaluated at compile time. 2004:
function that takes one string argument. The function is both an expression evaluator and a statement executor. In the latter role, it can also be used for error handling. The following examples and text are from the
1866:
the control with the AddCode method, which loads a string (or a string resource) containing a library of user-defined functions defined in the language of one's choice, prior to calling Eval.
1640:
may also be used to evaluate an expression within a specific class definition binding or object instance binding, allowing classes to be extended with new methods specified in strings.
91:, which executes a string (or code in other format) as if it were a statement; in some languages, such as Python, both are present, while in other languages only one of either 1938:, which executes the source code provided as an argument. Tcl represents all source code as strings, with curly braces acting as quotation marks, so that the argument to 2425: 2212:. In case the result is a single-element array, it outputs that single element. Similar to JavaScript, Windows PowerShell allows the final semicolon to be left off. 552:. Evaluation of this symbol must yield the function for addition to make the example work as intended. Thus some dialects of Lisp allow an additional parameter for 2599: 1854:
is a function evaluator that can include calls to user-defined functions. (These functions may have side-effects such as changing the values of global variables.)
1033:
function, which has been augmented to accept strings. In addition, it allows providing the function's environment directly, as environments are now
406:
function in Lisp expects a form to be evaluated as it's argument. The resulting value of the given form will be the returned value of the call to
2691: 843:
is a "language construct" rather than a function, and so cannot be used in some contexts where functions can be, like higher-order functions.
235:
is something of a hybrid between an expression evaluator and a statement executor. It returns the result of the last expression evaluated.
1893:'s compiler classes are part of the standard class library and usually present at run time, these can be used to evaluate a code string. 2280: 2696: 1877:(VBA), the programming language of Microsoft Office, is a virtual machine language where the runtime environment compiles and runs 511:
function. For example, to evaluate the content of a string, the string would first have to be converted into a Lisp form using the
544:
One major point of confusion is the question, in which context the symbols in the form will be evaluated. In the above example,
2730: 2513: 2208:
the Cmdlet is of the same type as the result of executing the expression. However, if the result is an empty array, it outputs
1909:
Because class and method definitions are also implemented by message-sends (to class objects), even code changes are possible:
1137:
which pops the string "Hello World" off the stack and displays it on the screen, to have an executable type, then is executed.
2735: 2619: 1834: 2340: 2300: 1874: 561: 116: 2648: 828:
must be a string of one or more complete statements, not just expressions; however, one can get the "expression" form of
2481: 2312: 1783: 1318:
The most general form for evaluating statements/expressions is using code objects. Those can be created by invoking the
84: 2299:. Microcoding this function was "substantially more" than five times faster compared to a program that interpreted an 1618: 1144:
operator is similar in functionality but instead the interpreter interprets PostScript expressions in a file, itself.
76: 31: 2542: 1034: 944: 63:; in others, it executes multiple lines of code as though they had been included instead of the line including the 2459: 2455: 1997: 782: 365: 2327:
is the actual call of the function with a given set of arguments. The distinction is particularly noticeable in
2443: 2323:
is understood to be the step of converting a quoted string into a callable function and its arguments, whereas
56: 2296: 111:
with data from an untrusted source may introduce security vulnerabilities. For instance, assuming that the
2725: 1431:" the string is statically compiled like ordinary code and must be known at compile time. For example: 2176:). It concatenates all the arguments with spaces, then re-parses and executes the result as a command. 1575:
It is particularly useful when you need to programmatically choose the variable you want to read from.
1243:, which allow the programmer to set up a restricted environment for the evaluation of the expression. 345:
The ActionScript 3 Eval Library and the D.eval API were development projects to create equivalents to
389: 190: 72: 38: 177:
dictionary to set an authenticated key to be True. To remedy this, all data which will be used with
2328: 1626: 354: 813:
executes code in a string almost exactly as if it had been put in the file instead of the call to
2200: 2099:
returns the value zero if there is no file named "XXX" (instead of halting the user's program).
778: 350: 315: 88: 2675: 2024:
expression. The function is handy for converting numeric strings to numeric internal form. The
2451: 1163: 381: 198: 2559: 2179: 2447: 206: 2432: 2332: 2292: 1510:
The above example will compile to exactly the same assembly language instructions as if "
793:
blocks is interpreted at compile-time instead of run-time, so it is not the meaning of
166: 2719: 2473: 2013: 1412: 71:
is not necessarily a string; it may be structured representation of code, such as an
2517: 2028:
can also be used as a crude form of indirection, as in the following (Note that, in
556:
to specify the context of evaluation (similar to the optional arguments to Python's
181:
must be escaped, or it must be run without access to potentially harmful functions.
2710: 2493: 2291:
to perform "interpretive evaluation of expressions which are written in a modified
2173: 1630: 331: 201:, the same compiler used to compile programs may be embedded in programs using the 60: 17: 48: 605:;; A context for evaluation is called an "environment" in Scheme slang. 376:
function led to the first implementation of the language interpreter. Before the
1858:
executes one or more colon-separated statements, which can change global state.
2484:, which can be interpreted to be the morphisms of Cartesian closed categories. 2169: 1522: 1100: 228: 52: 2706: 2284: 1890: 1878: 1850:
Microsoft's VBScript, which is an interpreted language, has two constructs.
205:
function; separate interpreters are sometimes used, though this results in
1717:# (evaluates to 4, because 'a' in the context of get_binding is 3) 817:. The only exception is that errors are reported as coming from a call to 197:
is almost always implemented with the same interpreter as normal code. In
2477: 2439: 2189: 2009: 1838: 388:
function had been manually compiled it was then used as part of a simple
2546: 2185: 2091:"open(\"X\", \"XXX\", \"r\")" 1415:
is a statically compiled language and therefore does not include an "
1322:
function and by telling it what kind of input it has to compile: an "
1419:" statement in the traditional sense, but does include the related " 30:"Evaluation (computer science)" redirects here. For other uses, see 2701: 2468: 2316: 2336: 767: 685: 515:
function and then the resulting form would have to be passed to
451:; of a form by prefixing it with "'", for example: 418:; A form which calls the + function with 1,2 and 3 as arguments. 311: 380:
function was defined, Lisp functions were manually compiled to
2576: 2277: 1931: 832:
by putting the expression in a return statement, which causes
806: 2560:
John McCarthy, "History of Lisp - The Implementation of Lisp"
1170:
function in its simplest form evaluates a single expression.
2343:. Thus, for example, in Scheme, the distinction is between 27:
Function in a programming language, which evaluates a string
1529:
function lets you evaluate a string expression at runtime.
821:, and return statements become the result of the function. 2530: 2315:, a careful distinction is commonly made between eval and 484:; Now form1 contains a form that can be used by eval, for 2424:, which is the essence of evaluating Lisp, described in 1942:
can have the same formatting as any other source code.
2571: 1625:
function similar to Python or Perl, and also allows a
442:; In Lisp any form is meant to be evaluated, therefore 392:
which formed the basis of the first Lisp interpreter.
626:;; Confuse the initial environment, so that + will be 536:"(format t \"Hello World!!!~%\")" 507:
Lisp is well known to be very flexible and so is the
2707:
Examples of runtime evaluation in several languages
2649:"Conversational Programming System Progress Report" 569:;; Define some simple form as in the above example. 1427:" interprets a string as code at runtime, with a " 1005:-- compile the expression to an anonymous function 399:function have also been implemented as compilers. 1748:"def hello; return 'hello';end" 2702:Jonathan Johnson on exposing classes to RBScript 2697:Python Library Reference: eval built-in function 2692:ANSI and GNU Common Lisp Document: eval function 759:'$ foo += 2; print "$ foo\n";' 602:;; Evaluate the form within the initial context. 448:; We can prevent Lisp from performing evaluation 2018: 2036:(underscore) is the concatenation operator.): 951:compiles Lua code into an anonymous function. 656:;; Notice that the returned value has changed. 372:function in 1958. In fact, definition of the 55:which evaluates a string as though it were an 2450:, with functions taken as morphisms, and the 2420:are the two interdependent components of the 2374:where the form (f x) is to be evaluated, and 1423:" statement. The difference is that, where " 1254:function in Python 3.x) executes statements: 1020:-- execute (and print the result '2') 318:framework. However, modern browsers provide 8: 1754:# add a method 'hello' to this class 1636:Aside from specifying a function's binding, 368:was the original language to make use of an 322:as a more secure alternative for this task. 1384:"print 'x + y = ', x + y" 973:Example to do the evaluation in two steps: 115:function gets data from the Internet, this 1934:programming language has a command called 502:; eval evaluated (+ 1 2 3) and returned 6. 965:"print('Hello World!')" 836:to return the result of that expression. 560:function - see below). An example in the 2074:preceded by the interrogation operator, 1048:"print('Hello ' .. a)" 2505: 1235:function takes two optional arguments, 824:Unlike some languages, the argument to 629:;; a name for the subtraction function. 349:in ActionScript 3. Both have ended, as 2020:The string argument is evaluated as a 785:). This differs from the above use of 342:ActionScript 3 does not support eval. 7: 2215:Example as an expression evaluator: 954:Example as an expression evaluator: 696:Example as an expression evaluator: 238:Example as an expression evaluator: 171:"session.update(authenticated=True)" 2598:"Volume 1 Commands and Utilities". 1124:converts the PostScript expression 298:'foo = foo + 2;alert(foo);' 79:forms), or of special type such as 25: 2281:Conversational Programming System 2243:Example as a statement executor: 2016:Release 3.2 Programmer's Manual. 1782:Most standard implementations of 878:'echo "$ foo";' 789:with strings in that code inside 736:Example as a statement executor: 564:dialect of Lisp (RRS and later): 275:Example as a statement executor: 83:(as in Python). The analog for a 1772:# evaluates to "hello" 334:(Flash's programming language), 173:as data, which would update the 2172:, including the original "sh" ( 2082:error conditions. For example: 59:in the language, and returns a 2406:is to be called with argument 2078:, permits the user to control 2063:which increments the variable 1920:'Object subclass:#Foo' 783:Exception handling syntax#Perl 445:; the call to + was performed. 413:This is an example Lisp code: 384:statements. However, once the 1: 2607:. AT&T. 1986. p. 41. 1875:Visual Basic for Applications 1870:Visual Basic for Applications 1669:# evaluating within a context 1390:"compile-sample.py" 1340:example (interactive shell): 1260:example (interactive shell): 1176:example (interactive shell): 839:Unlike some languages, PHP's 2516:. 2006-10-10. Archived from 2482:simply typed lambda calculus 2313:theoretical computer science 314:text, perhaps as part of an 2531:ActionScript 3 Eval Library 2266:'$ foo += 2; $ foo' 1975:"$ i squared is " 889:Example returning a value: 653:;; Evaluate the form again. 395:Later versions of the Lisp 32:Evaluation (disambiguation) 2752: 2676:The Metacircular Evaluator 2446:. Thus, for example, the 2168:command is present in all 1861:Both VBScript and JScript 1837:, there is a class called 1295:"x += 1; y -= 1" 29: 2620:"Draft EVAL Microprogram" 2460:Cartesian closed category 2331:, and languages based on 2155:Command-line interpreters 2102:The following executes a 1801:Win32FORTH code example: 1619:Ruby programming language 1029:in favor of the existing 2601:UNIX Programmer's Manual 2466:(or, properly speaking, 2444:closed monoidal category 2376: 2345: 2245: 2217: 2112: 2084: 2038: 1944: 1911: 1895: 1803: 1721: 1642: 1577: 1531: 1433: 1342: 1262: 1178: 1146: 1126: 1110: 1039: 999:"return a + 1" 975: 956: 891: 848: 738: 698: 668:user-initial-environment 638:user-initial-environment 617:user-initial-environment 566: 521: 415: 306:One use of JavaScript's 277: 240: 167:could supply the program 121: 47:, short for the English 2297:IBM System/360 Model 50 1818:\ Outputs "4" 927:'return $ foo;' 915://does not work in PHP5 2731:Unix SUS2008 utilities 2647:Rochester, Nathaniel. 2442:is used to define the 2293:Polish-string notation 2152: 1621:interpreter offers an 797:used in this article. 777:, which serves as its 2736:IBM i Qshell commands 1786:have two variants of 903:"Goodbye, world! 213:Programming languages 191:interpreted languages 39:programming languages 2572:"PHP: eval - Manual" 2472:) together with its 2329:functional languages 2148:"no label" 1543:"int(1+1)" 846:Example using echo: 548:contains the symbol 390:read-eval-print loop 73:abstract syntax tree 2402:where the function 2283:(CPS) introduced a 2238:'$ foo + 2' 1666:# (evaluates to 2) 1633:, to be specified. 1025:Lua 5.2 deprecates 860:"Hello, world! 722:'$ foo + 2' 18:Evaluation operator 2678:(SICP Section 4.1) 2514:"Flash 8 LiveDocs" 2201:Windows PowerShell 2195:Windows PowerShell 2012:as appears in the 1484:"num++;" 1396:"single" 1330:" statement or a " 1250:statement (or the 1075:"World!" 779:exception handling 635:environment-define 351:Adobe Flash Player 199:compiled languages 119:code is insecure: 2452:cartesian product 2263:invoke-expression 2235:invoke-expression 2205:Invoke-Expression 2188:General Commands 2135:"goto " 1326:" statement, an " 1113:((Hello World) =) 382:assembly language 267:'foo + 2' 16:(Redirected from 2743: 2679: 2673: 2667: 2666: 2664: 2662: 2653: 2644: 2638: 2637: 2635: 2633: 2624: 2615: 2609: 2608: 2606: 2595: 2589: 2588: 2586: 2585: 2568: 2562: 2557: 2551: 2550: 2545:. Archived from 2543:"The D.eval API" 2539: 2533: 2528: 2522: 2521: 2510: 2448:category of sets 2422:eval-apply cycle 2398: 2395: 2392: 2389: 2386: 2383: 2380: 2370: 2367: 2364: 2361: 2358: 2355: 2352: 2349: 2290: 2267: 2264: 2261: 2258: 2255: 2252: 2249: 2239: 2236: 2233: 2230: 2227: 2224: 2221: 2211: 2206: 2183: 2182: 2149: 2146: 2143: 2140: 2136: 2133: 2129: 2125: 2122: 2119: 2116: 2110:(if it exists): 2109: 2105: 2095: 2092: 2089: 2081: 2077: 2073: 2066: 2059: 2055: 2052: 2048: 2045: 2042: 2035: 2031: 2027: 2023: 2008: 2003: 1988: 1985: 1982: 1979: 1976: 1973: 1970: 1967: 1964: 1961: 1958: 1955: 1952: 1948: 1941: 1937: 1921: 1918: 1915: 1905: 1902: 1899: 1864: 1857: 1853: 1819: 1816: 1813: 1810: 1807: 1797: 1793: 1789: 1773: 1770: 1767: 1764: 1761: 1758: 1755: 1752: 1749: 1746: 1743: 1740: 1737: 1734: 1731: 1728: 1725: 1718: 1715: 1712: 1709: 1706: 1703: 1700: 1697: 1694: 1691: 1688: 1685: 1682: 1679: 1676: 1673: 1670: 1667: 1664: 1661: 1658: 1655: 1652: 1649: 1646: 1639: 1624: 1608: 1605: 1602: 1599: 1596: 1595:"queryname. 1593: 1590: 1587: 1584: 1581: 1571: 1568: 1565: 1562: 1559: 1556: 1553: 1550: 1547: 1544: 1541: 1538: 1535: 1528: 1513: 1506: 1503: 1500: 1497: 1494: 1491: 1488: 1485: 1482: 1479: 1476: 1473: 1470: 1467: 1464: 1461: 1458: 1455: 1452: 1449: 1446: 1443: 1440: 1437: 1430: 1426: 1422: 1418: 1403: 1400: 1397: 1394: 1391: 1388: 1385: 1382: 1379: 1376: 1373: 1370: 1367: 1364: 1361: 1358: 1355: 1352: 1349: 1346: 1339: 1333: 1329: 1325: 1321: 1314: 1311: 1308: 1305: 1302: 1299: 1296: 1293: 1290: 1287: 1284: 1281: 1278: 1275: 1272: 1269: 1266: 1259: 1253: 1249: 1242: 1238: 1234: 1227: 1224: 1221: 1218: 1215: 1212: 1209: 1206: 1203: 1200: 1197: 1194: 1191: 1188: 1185: 1182: 1175: 1169: 1153: 1150: 1143: 1133: 1130: 1120: 1117: 1114: 1106: 1091: 1088: 1085: 1082: 1079: 1076: 1073: 1070: 1067: 1064: 1061: 1058: 1055: 1052: 1049: 1046: 1043: 1032: 1028: 1021: 1018: 1015: 1012: 1009: 1006: 1003: 1000: 997: 994: 991: 988: 985: 982: 979: 969: 966: 963: 960: 950: 934: 931: 928: 925: 922: 919: 916: 913: 910: 907: 904: 901: 898: 895: 885: 882: 879: 876: 873: 870: 867: 864: 861: 858: 855: 852: 842: 835: 831: 827: 820: 816: 812: 796: 792: 788: 773: 763: 760: 757: 754: 751: 748: 745: 742: 732: 729: 726: 723: 720: 717: 714: 711: 708: 705: 702: 691: 675: 672: 669: 666: 663: 660: 657: 654: 651: 648: 645: 642: 639: 636: 633: 630: 627: 624: 621: 618: 615: 612: 609: 606: 603: 600: 597: 594: 591: 588: 585: 582: 579: 576: 573: 570: 559: 555: 551: 547: 540: 537: 534: 533:read-from-string 531: 528: 525: 518: 514: 513:read-from-string 510: 503: 500: 497: 494: 491: 488: 485: 482: 479: 476: 473: 470: 467: 464: 461: 458: 455: 452: 449: 446: 443: 440: 437: 434: 431: 428: 425: 422: 419: 409: 405: 398: 387: 379: 375: 371: 353:has reached its 348: 337: 321: 309: 302: 299: 296: 293: 290: 287: 284: 281: 271: 268: 265: 262: 259: 256: 253: 250: 247: 244: 234: 207:code duplication 204: 196: 180: 176: 172: 169:with the string 161: 158: 155: 152: 149: 146: 143: 140: 137: 134: 131: 128: 125: 114: 110: 98: 94: 82: 70: 66: 45: 21: 2751: 2750: 2746: 2745: 2744: 2742: 2741: 2740: 2716: 2715: 2688: 2683: 2682: 2674: 2670: 2660: 2658: 2651: 2646: 2645: 2641: 2631: 2629: 2622: 2618:Allen-Babcock. 2617: 2616: 2612: 2604: 2597: 2596: 2592: 2583: 2581: 2570: 2569: 2565: 2558: 2554: 2541: 2540: 2536: 2529: 2525: 2512: 2511: 2507: 2502: 2490: 2433:category theory 2400: 2399: 2396: 2393: 2390: 2387: 2384: 2381: 2378: 2372: 2371: 2368: 2365: 2362: 2359: 2356: 2353: 2350: 2347: 2333:lambda calculus 2309: 2288: 2285:microprogrammed 2274: 2269: 2268: 2265: 2262: 2259: 2256: 2253: 2250: 2247: 2241: 2240: 2237: 2234: 2231: 2228: 2225: 2222: 2219: 2209: 2204: 2197: 2178: 2177: 2162: 2157: 2151: 2150: 2147: 2144: 2141: 2138: 2134: 2131: 2127: 2123: 2120: 2117: 2114: 2107: 2103: 2097: 2096: 2093: 2090: 2087: 2079: 2075: 2071: 2064: 2061: 2060: 2057: 2053: 2050: 2047:"xyz" 2046: 2043: 2040: 2033: 2029: 2025: 2021: 2006: 2001: 1995: 1990: 1989: 1986: 1983: 1980: 1977: 1974: 1971: 1968: 1965: 1962: 1959: 1956: 1953: 1950: 1946: 1939: 1935: 1928: 1923: 1922: 1919: 1916: 1913: 1907: 1906: 1904:'1 + 2' 1903: 1900: 1897: 1887: 1872: 1862: 1855: 1851: 1848: 1831: 1826: 1821: 1820: 1817: 1814: 1811: 1808: 1805: 1795: 1791: 1787: 1780: 1775: 1774: 1771: 1768: 1765: 1762: 1759: 1756: 1753: 1750: 1747: 1744: 1741: 1738: 1735: 1732: 1729: 1726: 1723: 1720: 1719: 1716: 1713: 1710: 1707: 1704: 1701: 1698: 1695: 1692: 1689: 1686: 1683: 1680: 1677: 1674: 1671: 1668: 1665: 1662: 1660:'a + 1' 1659: 1656: 1653: 1650: 1647: 1644: 1637: 1622: 1615: 1610: 1609: 1606: 1603: 1600: 1597: 1594: 1591: 1588: 1585: 1582: 1579: 1573: 1572: 1569: 1566: 1563: 1560: 1557: 1554: 1551: 1548: 1545: 1542: 1539: 1536: 1533: 1526: 1520: 1511: 1508: 1507: 1504: 1501: 1498: 1495: 1492: 1489: 1486: 1483: 1480: 1477: 1474: 1471: 1468: 1465: 1462: 1459: 1456: 1453: 1450: 1447: 1444: 1441: 1438: 1435: 1428: 1424: 1420: 1416: 1410: 1405: 1404: 1401: 1398: 1395: 1392: 1389: 1386: 1383: 1380: 1377: 1374: 1371: 1368: 1365: 1362: 1359: 1356: 1353: 1350: 1347: 1344: 1337: 1331: 1327: 1323: 1319: 1316: 1315: 1312: 1309: 1306: 1303: 1300: 1297: 1294: 1291: 1288: 1285: 1282: 1279: 1276: 1273: 1270: 1267: 1264: 1257: 1251: 1247: 1240: 1236: 1232: 1229: 1228: 1225: 1222: 1219: 1216: 1213: 1210: 1207: 1204: 1202:'x + 1' 1201: 1198: 1195: 1192: 1189: 1186: 1183: 1180: 1173: 1167: 1160: 1155: 1154: 1151: 1148: 1141: 1135: 1134: 1131: 1128: 1122: 1121: 1118: 1115: 1112: 1104: 1098: 1093: 1092: 1089: 1086: 1083: 1080: 1077: 1074: 1071: 1068: 1065: 1062: 1059: 1056: 1053: 1050: 1047: 1044: 1041: 1030: 1026: 1023: 1022: 1019: 1016: 1013: 1010: 1007: 1004: 1001: 998: 995: 992: 989: 986: 983: 980: 977: 971: 970: 967: 964: 961: 958: 948: 941: 936: 935: 932: 929: 926: 923: 920: 917: 914: 911: 908: 905: 902: 899: 896: 893: 887: 886: 883: 880: 877: 874: 871: 868: 865: 862: 859: 856: 853: 850: 840: 833: 829: 825: 818: 814: 810: 803: 794: 790: 786: 781:mechanism (see 771: 765: 764: 761: 758: 755: 752: 749: 746: 743: 740: 734: 733: 730: 727: 724: 721: 718: 715: 712: 709: 706: 703: 700: 689: 682: 677: 676: 673: 670: 667: 664: 661: 658: 655: 652: 649: 646: 643: 640: 637: 634: 631: 628: 625: 622: 619: 616: 613: 610: 607: 604: 601: 598: 595: 592: 589: 586: 583: 580: 577: 574: 571: 568: 557: 553: 549: 545: 542: 541: 538: 535: 532: 529: 526: 523: 516: 512: 508: 505: 504: 501: 498: 495: 492: 489: 486: 483: 480: 477: 474: 471: 468: 465: 462: 459: 456: 453: 450: 447: 444: 441: 438: 435: 432: 429: 426: 423: 421:; It returns 6. 420: 417: 407: 403: 396: 385: 377: 373: 369: 363: 346: 335: 328: 319: 307: 304: 303: 300: 297: 294: 291: 288: 285: 282: 279: 273: 272: 269: 266: 263: 260: 257: 254: 251: 248: 245: 242: 232: 225: 220: 215: 202: 194: 187: 178: 174: 170: 163: 162: 159: 156: 153: 150: 147: 144: 141: 138: 135: 132: 129: 126: 123: 112: 108: 105: 96: 92: 80: 68: 67:. The input to 64: 43: 35: 28: 23: 22: 15: 12: 11: 5: 2749: 2747: 2739: 2738: 2733: 2728: 2718: 2717: 2714: 2713: 2704: 2699: 2694: 2687: 2686:External links 2684: 2681: 2680: 2668: 2639: 2610: 2590: 2563: 2552: 2549:on 2013-03-14. 2534: 2523: 2520:on 2006-10-10. 2504: 2503: 2501: 2498: 2497: 2496: 2489: 2486: 2377: 2346: 2308: 2305: 2273: 2270: 2246: 2218: 2196: 2193: 2161: 2158: 2156: 2153: 2113: 2085: 2054:"++" 2039: 1994: 1991: 1945: 1927: 1924: 1912: 1896: 1886: 1883: 1871: 1868: 1847: 1844: 1830: 1827: 1825: 1822: 1804: 1779: 1776: 1722: 1643: 1614: 1611: 1578: 1532: 1519: 1516: 1434: 1409: 1406: 1343: 1263: 1179: 1159: 1156: 1147: 1127: 1111: 1097: 1094: 1040: 976: 957: 940: 937: 892: 849: 802: 799: 739: 728:"\n" 699: 681: 678: 567: 522: 416: 362: 359: 327: 324: 278: 241: 224: 221: 219: 216: 214: 211: 186: 185:Implementation 183: 122: 104: 103:Security risks 101: 26: 24: 14: 13: 10: 9: 6: 4: 3: 2: 2748: 2737: 2734: 2732: 2729: 2727: 2724: 2723: 2721: 2712: 2708: 2705: 2703: 2700: 2698: 2695: 2693: 2690: 2689: 2685: 2677: 2672: 2669: 2657: 2656:Bitsavers.org 2650: 2643: 2640: 2628: 2627:Bitsavers.org 2621: 2614: 2611: 2603: 2602: 2594: 2591: 2580: 2578: 2573: 2567: 2564: 2561: 2556: 2553: 2548: 2544: 2538: 2535: 2532: 2527: 2524: 2519: 2515: 2509: 2506: 2499: 2495: 2492: 2491: 2487: 2485: 2483: 2479: 2475: 2474:right adjoint 2471: 2470: 2465: 2461: 2457: 2454:taken as the 2453: 2449: 2445: 2441: 2438: 2434: 2429: 2427: 2423: 2419: 2415: 2411: 2409: 2405: 2375: 2344: 2342: 2338: 2334: 2330: 2326: 2322: 2318: 2314: 2306: 2304: 2302: 2298: 2294: 2286: 2282: 2279: 2271: 2244: 2216: 2213: 2202: 2194: 2192: 2191: 2187: 2184: â€“  2181: 2175: 2171: 2167: 2159: 2154: 2121:"L" 2111: 2106:to the label 2100: 2083: 2070:In addition, 2068: 2037: 2017: 2015: 2014:UNIX System V 2011: 1999: 1992: 1943: 1933: 1925: 1910: 1894: 1892: 1884: 1882: 1880: 1876: 1869: 1867: 1859: 1845: 1843: 1840: 1836: 1828: 1823: 1802: 1799: 1785: 1777: 1699:'a+1' 1641: 1634: 1632: 1628: 1620: 1612: 1576: 1530: 1524: 1517: 1515: 1432: 1414: 1407: 1369:>>> 1357:>>> 1345:>>> 1341: 1335: 1334:" statement: 1307:>>> 1298:>>> 1289:>>> 1277:>>> 1265:>>> 1261: 1255: 1244: 1211:>>> 1193:>>> 1181:>>> 1177: 1171: 1165: 1157: 1145: 1140:PostScript's 1138: 1129:(Hello World) 1125: 1109: 1102: 1095: 1060:"t" 1038: 1036: 974: 955: 952: 946: 938: 890: 847: 844: 837: 822: 808: 800: 798: 784: 780: 776: 769: 737: 697: 694: 687: 679: 599:;Value: form2 565: 563: 520: 414: 411: 400: 393: 391: 383: 367: 360: 358: 356: 352: 343: 340: 333: 325: 323: 317: 313: 276: 239: 236: 230: 222: 217: 212: 210: 208: 200: 192: 184: 182: 168: 120: 118: 102: 100: 90: 86: 78: 74: 62: 58: 54: 50: 46: 40: 33: 19: 2726:Control flow 2711:Rosetta Code 2671: 2659:. Retrieved 2655: 2642: 2630:. Retrieved 2626: 2613: 2600: 2593: 2582:. Retrieved 2575: 2566: 2555: 2547:the original 2537: 2526: 2518:the original 2508: 2494:Data as code 2480:, form the 2467: 2463: 2436: 2430: 2421: 2417: 2413: 2412: 2407: 2403: 2401: 2373: 2324: 2320: 2310: 2275: 2242: 2214: 2198: 2174:Bourne shell 2165: 2163: 2101: 2098: 2069: 2062: 2019: 1996: 1929: 1908: 1888: 1873: 1860: 1849: 1832: 1800: 1781: 1635: 1616: 1598:#columnname# 1574: 1521: 1509: 1502:// Prints 1. 1411: 1336: 1317: 1256: 1245: 1230: 1172: 1161: 1139: 1136: 1123: 1099: 1054:"" 1024: 972: 953: 942: 888: 845: 838: 823: 804: 774: 766: 735: 695: 683: 543: 506: 412: 401: 394: 364: 344: 341: 332:ActionScript 329: 326:ActionScript 310:is to parse 305: 274: 237: 226: 188: 165:An attacker 164: 106: 42: 36: 2303:statement. 2170:Unix shells 2160:Unix shells 1705:get_binding 1675:get_binding 1220:'x' 355:end-of-life 2720:Categories 2584:2015-09-10 2500:References 2458:, forms a 2335:, such as 2301:assignment 1742:class_eval 1523:ColdFusion 1518:ColdFusion 1402:x + y = 3 1101:PostScript 1096:PostScript 1027:loadstring 993:loadstring 959:loadstring 949:loadstring 487:; example: 320:JSON.parse 229:JavaScript 223:JavaScript 218:ECMAScript 113:get_data() 57:expression 2462:. Here, 2287:function 2272:Microcode 2260:PS > 2248:PS > 2232:PS > 2220:PS > 1917:evaluate: 1901:evaluate: 1891:Smalltalk 1885:Smalltalk 1835:REALbasic 1829:REALbasic 1796:INTERPRET 1580:<cfset 1549:<cfset 1534:<cfset 1320:compile() 1149:(file.ps) 770:also has 674:;Value: 3 650:;Value: + 623:;Value: 7 85:statement 2488:See also 2478:currying 2440:morphism 2295:" on an 2276:In 1966 2010:man page 1914:Compiler 1898:Compiler 1846:VBScript 1839:RBScript 1815:EVALUATE 1792:EVALUATE 1589:Evaluate 1558:Evaluate 1527:evaluate 1035:upvalues 894:<?php 851:<?php 139:get_data 53:function 49:evaluate 37:In some 2661:Jan 17, 2632:Jan 17, 2456:product 2186:FreeBSD 2000:has an 1856:Execute 1809:2 2 + . 1806:S" 1687:binding 1631:binding 1490:writeln 1378:compile 1338:compile 175:session 124:session 51:, is a 2435:, the 2341:Scheme 2307:Theory 2210:$ null 2203:, the 2190:Manual 2142:puterr 2137:_label 1879:p-code 1812:" 1601:" 1512:num++; 1436:import 1332:single 1241:locals 1237:global 1166:, the 1164:Python 1158:Python 909:" 866:" 819:eval() 815:eval() 775:blocks 688:, the 641:'+ 575:define 562:Scheme 117:Python 107:Using 75:(like 61:result 2652:(PDF) 2623:(PDF) 2605:(PDF) 2469:apply 2418:apply 2382:apply 2354:' 2325:apply 2317:apply 2251:$ foo 2223:$ foo 2180:sh(1) 2130:?eval 2115:label 2086:?eval 2056:_name 1987:$ foo 1954:while 1824:BASIC 1784:Forth 1778:Forth 1769:hello 1724:class 1629:, or 1627:scope 1478:mixin 1445:stdio 1429:mixin 1421:mixin 1087:print 1081:print 1008:print 947:5.1, 933:?> 897:$ foo 884:?> 854:$ foo 741:$ foo 713:print 701:$ foo 665:form2 614:form2 581:' 578:form2 546:form1 496:form1 463:' 460:form1 255:alert 130:False 2663:2016 2634:2016 2579:.net 2464:eval 2437:eval 2426:SICP 2416:and 2414:Eval 2391:list 2351:eval 2339:and 2337:LISP 2321:Eval 2289:EVAL 2166:eval 2164:The 2104:goto 2072:eval 2049:eval 2041:name 2026:eval 2002:eval 1984:eval 1972:puts 1960:< 1940:eval 1936:eval 1930:The 1863:eval 1852:Eval 1794:and 1788:eval 1757:Test 1736:Test 1727:Test 1693:eval 1654:eval 1638:eval 1623:eval 1617:The 1613:Ruby 1607:> 1570:> 1546:> 1454:main 1451:void 1425:eval 1417:eval 1372:eval 1328:eval 1324:exec 1292:exec 1258:exec 1252:exec 1248:exec 1246:The 1239:and 1233:eval 1231:The 1214:eval 1196:eval 1174:eval 1168:eval 1119:exec 1105:exec 1090:})() 1042:load 1031:load 921:eval 918:echo 872:eval 841:eval 834:eval 830:eval 826:eval 811:eval 795:eval 791:eval 787:eval 772:eval 768:Perl 753:eval 716:eval 690:eval 686:Perl 680:Perl 662:eval 611:eval 558:eval 554:eval 527:eval 517:eval 509:eval 493:eval 457:setq 408:eval 404:eval 402:The 397:eval 386:eval 378:eval 374:eval 370:eval 366:Lisp 361:Lisp 347:eval 336:eval 316:Ajax 312:JSON 308:eval 292:eval 261:eval 233:eval 203:eval 195:eval 179:eval 157:data 151:eval 133:data 109:eval 99:is. 97:exec 93:eval 89:exec 81:code 77:Lisp 69:eval 65:eval 44:eval 2709:on 2577:PHP 2431:In 2311:In 2278:IBM 2199:In 2065:xyz 1949:foo 1947:set 1932:Tcl 1926:Tcl 1889:As 1833:In 1763:new 1733:end 1690:end 1672:def 1525:'s 1496:num 1466:num 1463:int 1439:std 1162:In 1152:run 1142:run 1116:cvx 1103:'s 1017:()) 968:)() 945:Lua 943:In 939:Lua 807:PHP 805:In 801:PHP 684:In 330:In 280:foo 270:)); 243:foo 227:In 189:In 145:foo 95:or 87:is 2722:: 2654:. 2625:. 2574:. 2476:, 2428:. 2410:. 2397:)) 2319:. 2139:)) 2124:if 2080:bs 2067:. 2032:, 2030:bs 2022:bs 2007:bs 1998:bs 1993:bs 1963:10 1798:. 1790:: 1714:)) 1499:); 1487:); 1457:() 1399:)) 1037:. 930:); 906:\n 881:); 863:\n 809:, 762:); 725:), 596:)) 539:)) 519:: 481:)) 410:. 357:. 301:); 231:, 209:. 193:, 142:() 41:, 2665:. 2636:. 2587:. 2408:x 2404:f 2394:x 2388:( 2385:f 2379:( 2369:) 2366:) 2363:x 2360:f 2357:( 2348:( 2257:2 2254:= 2229:2 2226:= 2145:= 2132:( 2128:( 2126:! 2118:= 2108:L 2094:) 2088:( 2076:? 2058:) 2051:( 2044:= 2034:_ 1981:} 1978:} 1969:{ 1966:} 1957:{ 1951:{ 1766:. 1760:. 1751:) 1745:( 1739:. 1730:; 1711:3 1708:( 1702:, 1696:( 1684:) 1681:a 1678:( 1663:) 1657:( 1651:1 1648:= 1645:a 1604:) 1592:( 1586:= 1583:x 1567:) 1564:x 1561:( 1555:= 1552:y 1540:= 1537:x 1505:} 1493:( 1481:( 1475:; 1472:0 1469:= 1460:{ 1448:; 1442:. 1413:D 1408:D 1393:, 1387:, 1381:( 1375:( 1366:2 1363:= 1360:y 1354:1 1351:= 1348:x 1313:0 1310:y 1304:2 1301:x 1286:1 1283:= 1280:y 1274:1 1271:= 1268:x 1226:1 1223:) 1217:( 1208:2 1205:) 1199:( 1190:1 1187:= 1184:x 1132:= 1084:= 1078:, 1072:= 1069:a 1066:{ 1063:, 1057:, 1051:, 1045:( 1014:f 1011:( 1002:) 996:( 990:= 987:f 984:1 981:= 978:a 962:( 924:( 912:; 900:= 875:( 869:; 857:= 756:( 750:; 747:2 744:= 731:; 719:( 710:; 707:2 704:= 671:) 659:( 647:) 644:- 632:( 620:) 608:( 593:2 590:5 587:+ 584:( 572:( 550:+ 530:( 524:( 499:) 490:( 478:3 475:2 472:1 469:+ 466:( 454:( 439:) 436:3 433:2 430:1 427:+ 424:( 295:( 289:; 286:2 283:= 264:( 258:( 252:; 249:2 246:= 160:) 154:( 148:= 136:= 127:= 34:. 20:)

Index

Evaluation operator
Evaluation (disambiguation)
programming languages
evaluate
function
expression
result
abstract syntax tree
Lisp
statement
exec
Python
could supply the program
interpreted languages
compiled languages
code duplication
JavaScript
JSON
Ajax
ActionScript
Adobe Flash Player
end-of-life
Lisp
assembly language
read-eval-print loop
Scheme
Perl
Perl
exception handling
Exception handling syntax#Perl

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.

↑