Core Function Values
From Sputnik Wiki
(Difference between revisions)
(Created page with "<pre> Values( <array>, <flag> ) </pre> === Description === Create an array containing all VALUES from a Hash (Dictionary) === Parameters === ==== array ==== The array to use...") |
|||
Line 1: | Line 1: | ||
<pre> | <pre> | ||
− | Values( <array | + | Values( <array> ) |
</pre> | </pre> | ||
Line 13: | Line 13: | ||
The array to use. | The array to use. | ||
− | |||
− | |||
− | |||
=== Return Value === | === Return Value === | ||
Line 28: | Line 25: | ||
=== Example === | === Example === | ||
− | |||
− | |||
<syntaxhighlight lang="sputnik"> | <syntaxhighlight lang="sputnik"> | ||
my $array = array( "One" => "Cat", "Two" => "Fire", "Three" => "FoX", "Four" => "Water", "moo", "lol" ); | my $array = array( "One" => "Cat", "Two" => "Fire", "Three" => "FoX", "Four" => "Water", "moo", "lol" ); | ||
my $Values = Values( $array ); | my $Values = Values( $array ); | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
foreach( $Values as $Value ) | foreach( $Values as $Value ) | ||
{ | { |
Revision as of 16:06, 22 April 2012
Values( <array> )
Contents |
Description
Create an array containing all VALUES from a Hash (Dictionary)
Parameters
array
The array to use.
Return Value
Success: A new array containing any/all values.
Failure: Returns empty array.
Remarks
None.
Example
my $array = array( "One" => "Cat", "Two" => "Fire", "Three" => "FoX", "Four" => "Water", "moo", "lol" ); my $Values = Values( $array ); foreach( $Values as $Value ) { println( "Value: $Value" ); }