Compatibility Dialects
Compatibility Dialects
Section titled “Compatibility Dialects”Code read in the rhost or mux dialect parses some things as RhostMUSH or TinyMUX does. The dialect is the attribute’s rhost or mux flag, or the dialect option for typed input and attributes without one (see compatibility config). Elsewhere, each of these reads as on PennMUSH.
- compatibility dialects rhostmush substitutions:
%+!,%-#,%-nand the rest, and the}prefix - compatibility dialects commas in one argument functions:
strlen(a,b)is 3
RhostMUSH substitutions
Section titled “RhostMUSH substitutions”Under the rhost dialect, these read as on RhostMUSH. Elsewhere %-n is -n, and %+! is the argument count followed by !.
%+!is every argument, joined by spaces, and%+!<c>!joins them with<c>.%-on its own is every argument from%10on, joined by commas.%-#,%-nand%-kare the dbref, name and moniker of the object whose queue entry is running, or of the player who typed the line. Au()does not change them, as it changes%!.%-mis the command line a hook is running for, and%-pthe line the player typed. Both are empty outside a hook.%-h<name>reads RhostMUSH’s attribute cache. SharpMUSH has none, so it is#-1 INVALID CACHE.%fis%f, and%wis#-1, as on a RhostMUSH game that defines no%fand checks no twink lock; SharpMUSH has neither.%wais#-1a, not attributeWA.
A command typed after } keeps its runs of spaces, whatever space_compress says.
> think ulambda(lit(#lambda/%+!|%+!-!),a,b,c)a b c|a-b-c> think %-#|%f|%w#1|%f|#-1> }think a ba bCommas in one-argument functions
Section titled “Commas in one-argument functions”Under the mux or rhost dialect, a function that takes one argument reads the commas in it as text, as TinyMUX and RhostMUSH do: strlen(a,b) is 3. Each piece is evaluated as it would be alone.
- Both:
capstr(),escape(),flip()(andreverse()),lcstr(),lit(),s(),secure(),strlen(),ucstr(). muxonly:sha1(),strmem(),t().rhostonly:decode64(),encode64(),ispunct(),strlenraw().
> think [strlen(a,b)] [ucstr(a, b)]3 A, B