Content deleted Content added
Aadirulez8 (talk | contribs) m v2.05 - Fix errors for CW project (Reference list missing / disambiguation page with disallowed <ref>) |
|||
(10 intermediate revisions by 8 users not shown) | |||
Line 1:
{{ProgLangCompare}}
Line 8 ⟶ 7:
===Common variants===
{| class="wikitable"
|-
Line 15 ⟶ 13:
|-
| +
| [[ALGOL 68]], [[
|-
| ++
| [[Erlang (programming language)|Erlang]], [[
|-
| $+
| [[
|-
| &
| [[Ada (programming language)|Ada]], [[AppleScript]], [[COBOL]] (for literals only), [[Curl (programming language)|Curl]], [[
|-
| concatenate
Line 30 ⟶ 28:
|-
| .
| Autohotkey, [[Maple
|-
| ~
| [[D (programming language)|D]], [[Raku (programming language)|Raku]], [[Symfony]] (Expression Language component)
|-
| <nowiki>||</nowiki>
| [[Icon (programming language)|Icon]], [[Maple
|-
| <>
| [[Mathematica]], [[Wolfram Language]], [[Elixir (programming language)|Elixir]]
|-
| ..
| [[Lua (programming language)|Lua]]
|-
| :
| [[Pick Basic]]
|-
| ,
| [[APL (programming language)|APL]], [[J (programming language)|J]], [[Smalltalk]]
|-
| ^
| [[F Sharp (programming language)|F#]], [[OCaml]], [[Rc (Unix shell)|rc]], [[Standard ML]]
|-
| //
Line 62 ⟶ 60:
===Unique variants===
* [[
* [[C (programming language)|C]] (along with [[Python (programming language)|Python]] and [[Dart (programming language)|Dart]]<ref>{{Cite web |title=Built-in types |url=https://dart.dev/language/built-in-types/ |access-date=2025-07-22 |website=dart.dev |language=en}}</ref>) allows juxtaposition for string literals, however, for strings stored as [[Character (computing)|character]] [[Array data structure|arrays]], the <code>[[strcat]]</code> function must be used.
* [[COBOL]] uses the <code>STRING</code> statement to concatenate string variables.
* [[MATLAB]] and [[GNU Octave
* [[Visual Basic]] and [[Visual Basic .NET]] can also use the "<code>+</code>" sign but at the risk of ambiguity if a string representing a number and a number are together.
* [[Microsoft Excel]] allows both "<code>&</code>" and the function "<code>=CONCATENATE(X,Y)</code>".
Line 94 ⟶ 92:
|-
| <code>"Hello, #{name}!"</code>
| CoffeeScript, Ruby, [[Elixir (programming language)|Elixir]]
|-
| <code>%Q(Hello, #{name}!)</code>
Line 100 ⟶ 98:
|-
| <code>(format nil "Hello, ~A" name)</code>
|[[Common Lisp]]
|-
| <code>`Hello, ${name}!`</code>
Line 143 ⟶ 141:
| {{nowrap|<code>r#"I said "Hello, world!""#</code>}}
|Rust (alternate)
|-
| {{nowrap|<code>R"("I said "Hello, world!")"</code>}}
|C++ (alternate)
|}
Line 251 ⟶ 252:
"</pre>
| {{No}}
|[[Common Lisp]] (all strings are multiline), Rust (all strings are multiline), Visual Basic .NET (all strings are multiline)
|-
| <pre>R"(
I have a lot of things to say
and so little time to say them
)"
</pre>
| {{No}}
| C++
|-
| <pre>r"
Line 295 ⟶ 304:
:1. {{note|es6rawstr}} <code>String.raw``</code> still processes string interpolation.
==
{{Reflist}}
:1. {{note|es6rawstr}} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/raw
|