Runtime evaluation: Difference between revisions

Add header for GW-BASIC
m (reoredering examples alphabeticaly (Python))
(Add header for GW-BASIC)
Line 101:
VAL and KEYIN execute code in the environment they are called from. In the above examples, VAL and KEYIN both see the local variable x.
There is no sandbox functionality in Bata BASIC or SAM BASIC.
 
===GW-BASIC===
<lang qbasic>10 LINE INPUT "Type an expression: ",A$
20 OPEN "CHAIN.TMP" FOR OUTPUT AS #1
30 PRINT #1, "70 LET Y=("+A$+")"
40 CLOSE #1
50 CHAIN MERGE "CHAIN.TMP",60,ALL
60 FOR X=0 TO 5
70 REM
80 PRINT X,Y
90 NEXT X
100 GOTO 10</lang>
 
==={{works with|ZX Spectrum Basic}} ===
Line 318 ⟶ 306:
 
println years5</lang>
 
==={{header|GW-BASIC=}}==
<lang qbasic>10 LINE INPUT "Type an expression: ",A$
20 OPEN "CHAIN.TMP" FOR OUTPUT AS #1
30 PRINT #1, "70 LET Y=("+A$+")"
40 CLOSE #1
50 CHAIN MERGE "CHAIN.TMP",60,ALL
60 FOR X=0 TO 5
70 REM
80 PRINT X,Y
90 NEXT X
100 GOTO 10</lang>
 
=={{header|HicEst}}==
Anonymous user