From WikiChip
Difference between revisions of "mirc/identifiers/$&"
Maroonbells (talk | contribs) |
|||
(One intermediate revision by one other user not shown) | |||
Line 8: | 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''' | ||
Line 22: | Line 21: | ||
<source lang="mIRC">alias testit { | <source lang="mIRC">alias testit { | ||
if ($me isin $+(Hello, $me,! How are you?)) $& | if ($me isin $+(Hello, $me,! How are you?)) $& | ||
− | + | { | |
echo -a This code block resembles some popular programming languages. | echo -a This code block resembles some popular programming languages. | ||
} | } | ||
}</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 == | ||
Line 31: | Line 33: | ||
== 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.