Difference between revisions of "To location"

From Kolmafia
Jump to navigation Jump to search
imported>Heeheehee
m (This function doesn't really work with ints.)
imported>Bale
m
Line 5: Line 5:
 
FunctionPage|
 
FunctionPage|
 
name={{#var:name}}|
 
name={{#var:name}}|
function_category=Datatype Conversions|
 
  
 
function1={{Function|
 
function1={{Function|
Line 22: Line 21:
 
special=While direct casting via $location[ ] is case-insensitive and able to catch partial matches, this function has the added benefit of passing variables as a string parameter.|
 
special=While direct casting via $location[ ] is case-insensitive and able to catch partial matches, this function has the added benefit of passing variables as a string parameter.|
 
}}
 
}}
 +
 +
[[Category:Datatype Conversions]]

Revision as of 05:22, 22 May 2010

needs(code_samples);

Function Syntax

location to_location(string name )

  • id is a location name to convert

Returns the location that matches name or id as specified.

Special

While direct casting via $location[ ] is case-insensitive and able to catch partial matches, this function has the added benefit of passing variables as a string parameter.