String append: Difference between revisions

m
 
(12 intermediate revisions by 10 users not shown)
Line 172:
<pre>
123456789!
</pre>
 
=={{header|Amazing Hopper}}==
<syntaxhighlight lang="c">
#include <jambo.h>
 
Main
r="un corderito", s="María tenía", t="felpudo"
Multicat ( s," ",r," ",t ),Get utf8, and print it
d=0
Let ' d := Utf8( Cat( Cat ( s, " un " ), t ) )'
Printnl ( "\n",d )
End
</syntaxhighlight>
{{out}}
<pre>
María tenía un corderito felpudo
María tenía un felpudo
</pre>
 
Line 364 ⟶ 384:
r₁
Return</syntaxhighlight>
 
 
=={{header|BASIC}}==
Line 380 ⟶ 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 396 ⟶ 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 401 ⟶ 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 415 ⟶ 450:
a$ = a$ ; "!"
print a$</syntaxhighlight>
 
==={{header|MSX Basic}}===
The [[#GW-BASIC|GW-BASIC]] solution works without any changes.
 
==={{header|QBasic}}===
Line 424 ⟶ 462:
a$ = a$ + " World!"
PRINT a$</syntaxhighlight>
 
==={{header|Quite BASIC}}===
The [[#GW-BASIC|GW-BASIC]] solution works without any changes.
 
==={{header|Run BASIC}}===
Line 439 ⟶ 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 449 ⟶ 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 598 ⟶ 674:
<pre>Hello world!</pre>
 
=={{header|Dart}}==
<syntaxhighlight lang="dart">void main() {
String str = "Hello";
str = str + " World!";
print(str);
}</syntaxhighlight>
 
=={{header|DBL}}==
Line 676 ⟶ 758:
 
=={{header|Elena}}==
ELENA 46.x :
<syntaxhighlight lang="elena">import extensions'text;
import extensions'text;
 
public program()
{
var s := StringWriter.load("Hello");
s.append:(" World");
console.printLine:writeLine(s).readChar()
}</syntaxhighlight>
 
Line 858 ⟶ 939:
String append
</pre>
 
=={{header|FutureBasic}}==
<syntaxhighlight lang="futurebasic">
Str255 s
 
s = "Hello"
s += " World!"
 
print s
 
HandleEvents
</syntaxhighlight>
 
=={{header|Gambas}}==
Line 1,171 ⟶ 1,264:
{{out}}
<pre>Hello, World!</pre>
 
=={{header|LDPL}}==
<syntaxhighlight lang="ldpl">data:
myText is text
 
procedure:
store "LD" in myText
in myText join myText "PL"
display myText lf
</syntaxhighlight>
{{out}}
<pre>
LDPL
</pre>
 
=={{header|Lingo}}==
Line 1,257 ⟶ 1,364:
<pre>
foobar
</pre>
 
=={{header|MiniScript}}==
<syntaxhighlight lang="miniscript">
s1 = "Hello"
s1 = s1 + ", "
s1 += "World!"
print s1
</syntaxhighlight>
{{out}}
<pre>
Hello, World!
</pre>
 
Line 1,786 ⟶ 1,905:
 
=={{header|Wren}}==
<syntaxhighlight lang="javascriptwren">var s = "Hello, "
s = s + "world!"
System.print(s)</syntaxhighlight>
56

edits