String interpolation: Difference between revisions

Content deleted Content added
Python: Should use %d instead of %s when referencing integers.
+Dart example
Line 121:
 
This results in the s-expression (I have 4 apples), where "I", "have", "4" and "apples" are symbols (i.e. identifiers), rather than strings.
 
=== Dart ===
<source lang="java">
int apples = 4, bananas = 3;
print('I have $apples apples');
print('I have ${apples+bananas} fruits');
</source>
 
The output will be:
<source lang="text">
I have 4 apples
I have 7 fruits
</source>
 
== Security Issues ==