String interpolation: Difference between revisions

Content deleted Content added
m LISP: Typo fixing and checking, typos fixed: ie. → i.e. using AWB (8097)
BattyBot (talk | contribs)
General fixes, removed orphan tag using AWB (8277)
Line 1:
'''String interpolation''' is a form of [[Quasi-quotation]], common in many [[programming language]]s which make heavy use of [[String_String (computer_sciencecomputer science)|string]] representations of data, such as [[Ruby (programming language)|Ruby]], [[PHP]], [[Perl]], etc. It means to insert a string or replace a variable with its value. It makes string formatting and specifying contents more intuitive.<ref>http://perlmeme.org/howtos/using_perl/interpolation.html</ref>
{{Orphan|date=February 2011}}
 
'''String interpolation''' is a form of [[Quasi-quotation]], common in many [[programming language]]s which make heavy use of [[String_(computer_science)|string]] representations of data, such as [[Ruby (programming language)|Ruby]], [[PHP]], [[Perl]], etc. It means to insert a string or replace a variable with its value. It makes string formatting and specifying contents more intuitive.<ref>http://perlmeme.org/howtos/using_perl/interpolation.html</ref>
 
== Examples ==
 
=== PHP ===
<source lang="PHP">
Line 114 ⟶ 113:
</source>
 
We can also generalise this to arbitrary (non-string) LISP expressions, known as [[S-expression|s-expressionsexpression]]s. The equivalent of string interpolation for s-expressions is quasi-quotation, for example:
 
<source lang="lisp">