Difference between revisions of "Remove property"

From Kolmafia
Jump to navigation Jump to search
imported>Smelltastic
(Created page with "{{ #vardefine:name|remove_property}}{{ #vardefine:return_type|void}}{{ FunctionPage| name={{#var:name}}| function1={{Function| name={{#var:name}}| aggregate={{#var:aggregate...")
 
imported>Fredg1
(return value)
Line 1: Line 1:
 
{{
 
{{
 
#vardefine:name|remove_property}}{{
 
#vardefine:name|remove_property}}{{
#vardefine:return_type|void}}{{
+
#vardefine:return_type|string}}{{
  
 
FunctionPage|
 
FunctionPage|
Line 26: Line 26:
 
}}|
 
}}|
  
function_description=If {{Pspan|prop}} is a built-in property, resets to default. Otherwise, removes from the user map, or global if {{Pspan|global}} is true.|
+
function_description=If {{Pspan|prop}} is a built-in property, resets to default. Otherwise, removes from the user map, or global if {{Pspan|global}} is true.
 +
 
 +
The return value is the value the property had prior to being reset.|
  
 
see_also={{SeeAlso|Miscellaneous_Functions#Property_Functions}}|
 
see_also={{SeeAlso|Miscellaneous_Functions#Property_Functions}}|

Revision as of 00:25, 20 August 2020

Function Syntax

string remove_property(string prop )

  • prop is the property to remove.

string remove_property(string prop ,boolean global )

  • prop is the property to remove.
  • global if true, look for the property specifically in the global map. If false or not included will look at the user map.

If prop is a built-in property, resets to default. Otherwise, removes from the user map, or global if global is true. The return value is the value the property had prior to being reset.

See Also

Miscellaneous_Functions#Property_Functions()