Comparison of programming languages (strings): Difference between revisions

Content deleted Content added
1011X (talk | contribs)
correct text for Rust
Added Visual Basic .NET to where it wasn't already
Line 24:
|-
| &
| [[Ada (programming language)|Ada]], [[AppleScript]], [[COBOL]] (for literals only), [[Curl programming language|Curl]], [[Seed7]], [[VHDL]], [[Visual Basic]], [[Visual Basic .NET]], [[Microsoft Excel|Excel]], [[FreeBASIC]]
|-
| nconc
Line 66:
* [[COBOL]] uses the <code>STRING</code> statement to concatenate string variables.
* [[MATLAB]] and [[Octave programming language|Octave]] use the syntax "<code>[x y]</code>" to concatenate x and y.
* [[Visual Basic]] Versionsand 1[[Visual toBasic 6.NET]] can also use the "<code>+</code>" sign but, thisat the leadsrisk toof ambiguity if a string representing a number and a number is addedare together.
* [[Microsoft Excel]] allows both "<code>&</code>" and the function "<code>=CONCATENATE(X,Y)</code>".
* [[Rust (programming language)|Rust]] has the <code>concat!</code> macro and the <code>format!</code> macro, of which the latter is the most prevalent throughout the documentation and examples.
Line 82:
|-
| <tt>$"hello, {name}"</tt>
| C#, Visual Basic .NET
| C#
|-
| <tt>"Hello, $name!"</tt>
Line 154:
|-
| <tt>"I said ""Hello, world!"""</tt>
| Ada, ALGOL 68, Excel, Fortran, Visual Basic (.NET), FreeBASIC, COBOL
|-
| <tt><nowiki>'I said ''Hello, world!'''</nowiki></tt>
Line 224:
| No
| CoffeeScript, Python, Groovy, Swift
|-
|<tt>"<br />I have a lot of things to say<br />and so little time to say them<br />"</tt>
|No
|Visual Basic .NET (all strings are multiline)
|}