String append: Difference between revisions
m
→{{header|Binary Lambda Calculus}}
imported>Chinhouse No edit summary |
|||
(8 intermediate revisions by 6 users not shown) | |||
Line 384:
r₁
Return</syntaxhighlight>
=={{header|BASIC}}==
Line 400 ⟶ 398:
</syntaxhighlight>
==={{header|BASIC256}}===▼
<syntaxhighlight lang="freebasic">a$ = "He"▼
a$ = a$ & "llo"▼
a$ = a$ + " Wo"▼
a$ += "rld"▼
a$ &= "!"▼
print a$</syntaxhighlight>▼
==={{header|BBC BASIC}}===
Line 416 ⟶ 421:
{{out}}
<pre>HELLO WORLD!</pre>
==={{header|Chipmunk Basic}}===
{{works with|Chipmunk Basic|3.6.4}}
<syntaxhighlight lang="qbasic">10 a$ = "Hello"
20 a$ = a$ + " World!"
30 print a$</syntaxhighlight>
==={{header|GW-BASIC}}===
{{works with|PC-BASIC|any}}
{{works with|BASICA}}
{{works with|Applesoft Basic}}
{{works with|Chipmunk Basic}}
{{works with|QBasic}}
{{works with|Quite BASIC}}
{{works with|MSX BASIC}}
<syntaxhighlight lang="qbasic">10 LET a$ = "Hello"
20 LET a$ = a$ + " World!"
30 PRINT a$</syntaxhighlight>
==={{header|IS-BASIC}}===
Line 421 ⟶ 444:
110 LET S$=S$&" World!"
120 PRINT S$</syntaxhighlight>
▲==={{header|BASIC256}}===
▲<syntaxhighlight lang="freebasic">a$ = "He"
▲a$ = a$ & "llo"
▲a$ = a$ + " Wo"
▲a$ += "rld"
▲a$ &= "!"
▲print a$</syntaxhighlight>
==={{header|Liberty BASIC}}===
Line 435 ⟶ 450:
a$ = a$ ; "!"
print a$</syntaxhighlight>
==={{header|MSX Basic}}===
The [[#GW-BASIC|GW-BASIC]] solution works without any changes.
==={{header|QBasic}}===
Line 444 ⟶ 462:
a$ = a$ + " World!"
PRINT a$</syntaxhighlight>
==={{header|Quite BASIC}}===
The [[#GW-BASIC|GW-BASIC]] solution works without any changes.
==={{header|Run BASIC}}===
Line 459 ⟶ 480:
PRINT a$
END</syntaxhighlight>
==={{header|uBasic/4tH}}===
<syntaxhighlight lang="qbasic">a := "Hello"
a = Join (a, " World!")
Print Show(a)</syntaxhighlight>
==={{header|XBasic}}===
{{works with|Windows XBasic}}
<syntaxhighlight lang="qbasic">PROGRAM "String append"
VERSION "0.0000"
DECLARE FUNCTION Entry ()
FUNCTION Entry ()
a$ = "Hello"
a$ = a$ + " World!"
PRINT a$
END FUNCTION
END PROGRAM</syntaxhighlight>
==={{header|Yabasic}}===
Line 469 ⟶ 509:
print a$</syntaxhighlight>
=={{header|Binary Lambda Calculus}}==
BLC program
<pre>18 16 46 80 05 bc bc fd f6 e0 69 6f 6e</pre>
based on https://github.com/tromp/AIT/blob/master/rosetta/catstrings.lam
appends "ion" to "on" to output "onion".
=={{header|BQN}}==
<syntaxhighlight lang="bqn">str ← "oneTwo"
•Out str ∾↩ "Three"
str</syntaxhighlight>
{{out}}
<pre>oneTwoThree
"oneTwoThree"</pre>
=={{header|Bracmat}}==
Line 618 ⟶ 674:
<pre>Hello world!</pre>
=={{header|Dart}}==
<syntaxhighlight lang="dart">void main() {
String str = "Hello";
str = str + " World!";
print(str);
}</syntaxhighlight>
=={{header|DBL}}==
Line 696 ⟶ 758:
=={{header|Elena}}==
ELENA
<syntaxhighlight lang="elena">import extensions'text;
public program()
{
var s := StringWriter.load("Hello");
s.append
console.
}</syntaxhighlight>
Line 1,844 ⟶ 1,905:
=={{header|Wren}}==
<syntaxhighlight lang="
s = s + "world!"
System.print(s)</syntaxhighlight>
|