String interpolation (included): Difference between revisions

String interpolation (included) in various BASIC dialents
m (→‎{{header|Run BASIC}}: added " which was missing in the first line)
(String interpolation (included) in various BASIC dialents)
Line 679:
print str
}</lang>
 
=={{header|BASIC}}==
==={{header|BASIC256}}===
<lang basic256>x$ = "big"
print "Mary had a "; x$; " lamb"
 
x$ = "little"
print "Mary also had a "; ljust(x$, length(x$)); " lamb"</lang>
 
==={{header|QBasic}}===
<lang QBasic>x$ = "big"
PRINT "Mary had a "; x$; " lamb"
x$ = "little"
PRINT USING "Mary also had a & lamb"; x$</lang>
 
==={{header|True BASIC}}===
<lang qbasic>LET x$ = "big"
PRINT "Mary had a "; x$; " lamb"
 
LET x$ = "little"
PRINT USING "Mary had another $##### lamb": x$
 
LET outstring$ = USING$("$#####", x$)
PRINT "Mary also had a "; outstring$; " lamb"
END</lang>
 
=={{header|Batch File}}==
2,136

edits