String append: Difference between revisions
→{{header|langur}}
No edit summary |
Langurmonkey (talk | contribs) |
||
(15 intermediate revisions by 12 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|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
<syntaxhighlight lang="elena">import extensions'text;
public program()
{
var s := StringWriter.load("Hello");
s.append
console.
}</syntaxhighlight>
Line 725 ⟶ 806:
<syntaxhighlight lang="emal">
^|EMal has mutable strings;
|the append
|^
text hello = "Hello, "
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,158 ⟶ 1,251:
=={{header|langur}}==
<syntaxhighlight lang="langur">var
writeln
{{out}}
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,377 ⟶ 1,496:
Output:
<pre>Hello World !</pre>
=={{header|PascalABC.NET}}==
<syntaxhighlight lang="delphi">
begin
var s := 'Pascal';
s += 'ABC';
s += '.NET';
s.Println;
end.
</syntaxhighlight>
{{out}}
<pre>PascalABC.NET</pre>
=={{header|Perl}}==
Line 1,786 ⟶ 1,920:
=={{header|Wren}}==
<syntaxhighlight lang="
s = s + "world!"
System.print(s)</syntaxhighlight>
|