Lasso Soft Inc. > Home

[ pair->value ]

Method

The [pair->value] method returns the second element of a pair.

This method is equivalent to the [pair->second] method.

The pair data type is usually used within an array to store a sequence of name/value pairs. The [map->get] method also returns elements of type pair.

  • Syntax
pair->value
Examples
  • Beginner

To return the second element of a pair:

Use the [pair->value] method. The following example iterates throug an array of pairs and returns the second element of each one.

Code

var( someGuy = array( 'First Name' = 'John', 'Last_Name' = 'Doe', 'Sex' = 'Male', 'Height' = '188cm') )

with p in $someGuy
     do => {^
          #p->value+'\n'
     ^}

Result

John
Doe
Male
188cm

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2014 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft