Core Function Enumerate

From Sputnik Wiki
Jump to: navigation, search
Enumerate( <enum> )

Contents

Description

Cycle through all Name + Values in an enum

Parameters

enum

The enum to use.

Return Value

Success: A hash containing Key/Values matching the Enums.

Failure: Returns nothing.

Remarks

None.

Example

enum Countries
{
	$England = 1,
	$France = 2,
	$Germany = 3,
	$Netherlands = 4,
	$Italy = 6,
	$Soviet = 7
};
 
foreach( Enumerate("Countries") as $Country => $ID )
{
	println("Enum item Name '$Country' Value '$ID'");
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox