Free

Syntax

Key:Free(Boolean keyhandler)

Description

Releases the variable from being bound to the key assigned to it.

Boolean keyhandler - a Boolean variable bound to a key using Key:New.

Note

keyhandler should be bound with a Key from Key:New.

The sample code below demonstrates two separate attempt to override the bound Boolean variable.

The first attempt fails, the next attempt succeeds because of Key:Free.

Example

function main() {
  Var:Boolean KEY_A; //declares a Boolean variable
  Key:New("a",KEY_A) //bind key 'a' to 'KEY_A'
 
  KEY_A = true; //attempt #1 to override KEY_A's value
 
  Key:Free(KEY_A)
  KEY_A = true; //attempt #2 to override KEY_A's value
}
www.konsolscript.org
© 2005-2011 KonsolScript Labs | All Rights Reversed | Licensed under GNU GPL | Designed by Mj Mendoza IV
http://www.sourceforge.net