Copy a string: Difference between revisions
Copy a string in various BASIC dialents
m (Remove trailing newline) |
(Copy a string in various BASIC dialents) |
||
Line 516:
This will print "Goodbye...Goodbye..." because the variable 'b' points to the same memory area as 'a$'.
==={{header|BASIC256}}===
<lang freebasic>src$ = "Hello"
dst$ = src$
src$ = " world..."
print dst$; src$</lang>
==={{header|QBasic}}===
{{works with|QBasic|1.1}}
{{works with|QuickBasic|4.5}}
{{works with|PB|7.1}}
<lang qbasic>src$ = "Hello" ' is the original string
dst$ = src$ ' is the copy
src$ = " world..."
PRINT dst$; src$</lang>
==={{header|True BASIC}}===
{{works with|QBasic}}
{{works with|BASIC256}}
{{works with|Yabasic}}
<lang qbasic>LET src$ = "Hello"
LET dst$ = src$
LET src$ = " world..."
PRINT dst$; src$
END</lang>
==={{header|Yabasic}}===
<lang yabasic>src$ = "Hello"
dst$ = src$
src$ = " world..."
print dst$, src$
end</lang>
==={{header|Commodore BASIC}}===
|