Lasso Soft Inc. > Home

[ staticarray->keys ]

Method

Returns a staticarray containing each element position.

  • Syntax
staticarray->keys
Examples
  • Beginner

Gat a staticarray of the element positions of a staticarray

This example uses the [staticarray->keys] method to output a comparison of two staticarrays.

Code

var( DaysOfWeek = staticarray('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'),
     JoursDuSemaine = staticarray('Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam') )

iterate($DaysOfWeek->keys) => {^
     $DaysOfWeek->get(loop_value)+' = '+$JoursDuSemaine->get(loop_value)+'\n'
^}

Result

Sun = Dim
Mon = Lun
Tue = Mar
Wed = Mer
Thu = Jeu
Fri = Ven
Sat = Sam

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 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft