# # Patch name: function_preserve_help.patch # Patch version: 2 # Author's name: Kurt Fitzner # Author's email: kfitzner@nexus.v-wave.com # Version of PennMUSH: 1.7.2p26 # Date patch made: Sun Jul 18 18:00:58 1999 # Author is willing to support (yes/no): yes # Patch format: duff -u5 # # # This is a contributed PennMUSH patch. Its use is subject to the # same restrictions found in PennMUSH's hdrs/copyrite.h file. # # No warranty is given for this patch. It is not necessarily going # to work on your system, with any version of PennMUSH other than # the one above, etc. # # If the author given above was willing to support the patch, you # should write to the author if you have any questions or problems. Do # *NOT* send email messages to Javelin or any PennMUSH mailing list about # this patch! # # Below this line is the author's description of the patch, # followed by the patch itself. If the patch is in context diff # format, you'll probably apply it by typing: patch < patchfile # in your top-level MUSH directory, unless instructed otherwise # below. # # This patch contains only changes to the help files to document the # function_preserve.patch patch. # diff -u5 ../tm/game/txt/hlp/penncmd.hlp game/txt/hlp/penncmd.hlp --- ../tm/game/txt/hlp/penncmd.hlp Sun Jul 18 18:01:30 1999 +++ game/txt/hlp/penncmd.hlp Sun Jul 18 18:00:58 1999 @@ -1076,10 +1076,11 @@ See also: PUPPET, DBREF & @function @function [=,] @function/delete + @function/preserve When used without any arguments, this command lists all global user-defined functions. For wizards and others with the Functions power, it also lists the dbref number and attribute corresponding to the listed functions. @@ -1088,16 +1089,19 @@ , which evaluates to on . can be anything that the player using the @function command controls. must be 30 characters or less. @function/delete removes a user-defined function. + The preserve switch causes the function to preserve any setq() or + setr() type registers when it it executed, just like ulocal() does. + +(continued in help @function2) +& @function2 A function defined using @function works just like any of the normal MUSH functions, from the user's perspective. The functions are executed by the object, with its powers. - -(continued in help @function2) -& @function2 + Functions defined via @function should follow the format used by UFUN() - %0 is the first argument passed, %1 is the second argument passed, and so forth. Example: @@ -1124,10 +1128,12 @@ @startup #1=@dol lattr(#100)=@function ##=#100,## And then store each function as an attribute of the same name on object #100. + + Global See also: FUNCTIONS, global functions, @startup & @grep @grep[/] [/]=