Runtime evaluation: Difference between revisions

mNo edit summary
Line 163:
20 LOAD "PROG2"
</lang>
 
You can also include code in a text string as follows:
<lang zxbasic>10 LET f$=CHR$ 187+"(x)+"+CHR$ 178+"(x*3)/2": REM LET f$="SQR (x)+SIN (x*3)/2"
20 FOR x=0 TO 2 STEP 0.2
30 LET y=VAL f$
40 PRINT y
50 NEXT x
</lang>
 
CHR$ 178 is the token of function SQR, and CHR$ 178 is the token of function SIN.
 
=={{header|BBC BASIC}}==
672

edits