Comparison of programming languages (strings): Difference between revisions

Content deleted Content added
m Cut needless carriage return WP:LISTGAP between items. WP:LINKs: update-standardizes, needless WP:PIPEs > WP:NOPIPEs, underscore > space, adds.
Line 8:
 
===Common variants===
 
{| class="wikitable"
|-
Line 15 ⟶ 14:
|-
| +
| [[ALGOL 68]], [[BASIC programming language|BASIC]], [[C++]], [[C Sharp (programming language)|C#]], [[Cobra (programming language)|Cobra]], [[Dart (programming_languageprogramming language)|Dart]], [[Eiffel (programming language)|Eiffel]], [[F Sharp (programming language)|F#]], [[Go (programming language)|Go]], [[Java (programming language)|Java]], [[JavaScript]], [[Object Pascal]], [[Objective-C]], [[Pascal (programming language)|Pascal]], [[Python (programming language)|Python]], [[Ruby (programming language)|Ruby]], [[Rust (programming language)|Rust]], [[Scala (programming language)|Scala]], [[Swift (programming language)|Swift]], [[Turing (programming language)|Turing]], [[Windows PowerShell]], Ya
|-
| ++
| [[Erlang (programming language)|Erlang]], [[Haskell (programming language)|Haskell]]
|-
| $+
| [[MIRCmIRC scripting language|mIRC Scripting Language]]
|-
| &
| [[Ada (programming language)|Ada]], [[AppleScript]], [[COBOL]] (for literals only), [[Curl (programming language)|Curl]], [[FreeBASIC]], [[Microsoft Excel|Excel]], [[Nim (programming language)|Nim]], [[Seed7]], [[VHDL]], [[Visual Basic]], [[Visual Basic .NET]]
|-
| concatenate
Line 30 ⟶ 29:
|-
| .
| Autohotkey, [[Maple computer algebra system(software)|Maple]] (up to version 5), [[Perl]], [[PHP]]
|-
| ~
| [[D (programming language)|D]], [[Raku (programming language)|Raku]], [[Symfony]] (Expression Language component)
|-
| <nowiki>||</nowiki>
| [[Icon (programming language)|Icon]], [[Maple computer algebra system(software)|Maple]] (from version 6), [[PL/I]], [[Rexx]], Standard [[SQL]]
|-
| <>
Line 42 ⟶ 41:
|-
| ..
| [[Lua (programming language)|Lua]]
|-
| :
Line 48 ⟶ 47:
|-
| ,
| [[APL (programming language)|APL]], [[J (programming language)|J]], [[Smalltalk]]
|-
| ^
Line 62 ⟶ 61:
===Unique variants===
 
* [[AwkAWK]] uses the empty string: two expressions adjacent to each other are concatenated. This is called [[Juxtaposition (literary)|juxtaposition]]. [[Unix shell]]s have a similar syntax. [[Rexx]] uses this syntax for concatenation including an intervening space.
* [[C (programming language)|C]] (along with Python) 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 programming language|Octave]] use the syntax "<code>[x y]</code>" to concatenate x and y.
* [[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 100 ⟶ 99:
|-
| <code>(format nil "Hello, ~A" name)</code>
|[[Common Lisp]]
|-
| <code>`Hello, ${name}!`</code>
Line 251 ⟶ 250:
"</pre>
| {{No}}
|[[Common Lisp]] (all strings are multiline), Rust (all strings are multiline), Visual Basic .NET (all strings are multiline)
|-
| <pre>r"