Core Function Rev

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "<pre> Rev( <array> ) </pre> === Description === Returns a new array consisting of the reverse of another array. === Parameters === ==== array ==== The array to use. === Ret...")
 
m (1 revision)
 
(2 intermediate revisions by one user not shown)
Line 21: Line 21:
 
=== Remarks ===
 
=== Remarks ===
  
This does not include Hash values with the array values.
+
This does not reverse Hash values only the Array values.
  
 
=== Example ===
 
=== Example ===

Latest revision as of 12:37, 14 June 2015

Rev( <array> )

Contents

Description

Returns a new array consisting of the reverse of another array.

Parameters

array

The array to use.

Return Value

Success - Returns reversed.

Failure - Returns empty array.

Remarks

This does not reverse Hash values only the Array values.

Example

$array = array ( "One", "Two", "Three", "Four" );
 
my $NewArray = Rev($array);
 
$i = 0;
Foreach ( $NewArray as $i )
{
	println("Element ($i) is: " . $i);
	$i++;
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox