Difference between revisions of "$&"

From Scriptwiki
Jump to: navigation, search
m (found the $+ page :o)
m (Added same content as "DollarAnd".)
 
Line 1: Line 1:
This identifier allows you to break up a single line into multiple lines which are combined when the script is performed, so you can edit long commands more easily.
+
$& is used to split one long line over multiple lines for script readability.
  $&
+
 
==Example==
+
  $&  
longline {
+
 
  [[echo]] This is an example of a long $&
+
==Examples==
line that has been split into multiple lines $&
+
 
to make it easier to edit
+
  [[echo]] -atg This is a really long line that, if there were complicated coding identifiers and variable names, $&
}
+
  would get really confusing and cramped without the added help of the $& identifier.
Echoes the entire sentence which has been split over 3 lines.
+
 
 +
While this seems useless, if there was a heavy use of identifiers and such throughout the line, it would help make it much more readable.
 +
 
 +
 
 
==See Also==
 
==See Also==
* [[DollarPlus|$+]]
+
* [[DollarPlus]]
[[Category:Identifiers]]
+
* [[Proper coding format]]
 +
 
 +
[[Category:Other Identifiers]]

Latest revision as of 22:55, 22 June 2013

$& is used to split one long line over multiple lines for script readability.

$& 

Examples

echo -atg This is a really long line that, if there were complicated coding identifiers and variable names, $&
 would get really confusing and cramped without the added help of the $& identifier.

While this seems useless, if there was a heavy use of identifiers and such throughout the line, it would help make it much more readable.


See Also