projects.practivist.org

sendero_base.Set

Authors:
Aaron Craelius

License:
GNU Lesser General Public License v3



void set (X)(ref Var var, X val);
Convenience function for setting sendero_base Var's using standard D values.

It is recommended to set Var values using the set function (or to write a similar convenience function for your own purposes), rather than interfacing directly to Var structs. This will make it easier to adjust to API changes in the Var struct.

Params:
var the Var to set
val the value to set it to

Examples:
 Var v1, v2;

 set(v1, 5);		// Sets v1 to type VarT.Number with value 5
 set(v2, "hello");	// Sets v2 to type VarT.String with value "hello"


Documentation last updated Thu May 29 17:23:14 2008