This is a simple custom type for storing and retrieving arbitrary name=value pairs on the fly. It's essentially [map] without the need for ->insert and ->find. You can still use all the standard member tags of [map], though, including ->size, ->keys, ->values, ->contains, and ->remove.
Parameters
none
Sample Usage
'Initialize and Display:<br>';
/* this works as well as the method below
var('user') = dictionary(
'name' = 'John Smith',
'address' = '1234 This Way',
'city' = 'Anytown',
'state' = 'KY',
'zip' = 90210
);
// */
// /*
var('user') = dictionary;
$user->name = 'John Smith';
$user->address = '1234 This Way';
$user->city = 'Anytown';
$user->state = 'NE';
$user->zip = 90210;
// */
$user->name + '<br>';
$user->address + '<br>';
$user->city + ', ' + $user->state + ' ' + $user->zip;
'<hr>Keys: ';
$user->keys;
'<hr>Values: ';
$user->values;
'<hr>Size: ';
$user->size;
'<hr>Remove and Contains: ';
$user->remove('zip');
$user->contains('zip');
'<hr>Convert: ';
$user;
Source Code
Click the "Download" button below to retrieve a copy of this tag,
including the complete documentation and sample usage shown
on this page. Place the downloaded ".inc" file in your
LassoStartup folder, restart Lasso, and you can begin using this
tag immediately.