From WikiChip
Difference between revisions of "mirc/identifiers/$&"
(Created $& identifier - mIRC) |
Maroonbells (talk | contribs) |
||
(12 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
− | '''$&''' allows you to break up long, single script lines in order to make editing and reading them much easier. | + | {{mirc title|$& Identifier}}'''$&''' is a construct which allows you to break up long, single script lines in order to make editing and reading them much easier. |
+ | |||
+ | '''Note''': $& can touch the end of your line and still be valid, see the example | ||
== Synopsis == | == Synopsis == | ||
Line 6: | Line 8: | ||
== Parameters == | == Parameters == | ||
None | None | ||
− | |||
== Examples == | == Examples == | ||
'''An alias that breaks up a long echo into multiple lines''' | '''An alias that breaks up a long echo into multiple lines''' | ||
<source lang="mIRC">alias testit { | <source lang="mIRC">alias testit { | ||
− | echo -a This is a really long $& | + | echo -a This is a really long$& |
line that is broken up because $& | line that is broken up because $& | ||
mIRC supports it! The cool thing is $& | mIRC supports it! The cool thing is $& | ||
Line 24: | Line 25: | ||
} | } | ||
}</source> | }</source> | ||
+ | |||
+ | Note: Non-spaces are not permitted following it on the same line, and this reports there is no such identifier (unless you create a custom identifier named '&') | ||
+ | <pre>//echo -a foo $& bar</pre> | ||
== Compatibility == | == Compatibility == | ||
− | + | {{mIRC compatibility|5.5}} | |
− | |||
− | |||
== See Also == | == See Also == | ||
− |
Latest revision as of 13:06, 25 April 2023
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
$& is a construct which allows you to break up long, single script lines in order to make editing and reading them much easier.
Note: $& can touch the end of your line and still be valid, see the example
Synopsis[edit]
$&
Parameters[edit]
None
Examples[edit]
An alias that breaks up a long echo into multiple lines
alias testit { echo -a This is a really long$& line that is broken up because $& mIRC supports it! The cool thing is $& that mIRC will also format these $& indentations within the script editor! }
Create an alias that has a code block similar to a programming language
alias testit { if ($me isin $+(Hello, $me,! How are you?)) $& { echo -a This code block resembles some popular programming languages. } }
Note: Non-spaces are not permitted following it on the same line, and this reports there is no such identifier (unless you create a custom identifier named '&')
//echo -a foo $& bar
Compatibility[edit]
Added: mIRC v5.5
Added on: 08 Jan 1999
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.