Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: is_itemcontainer - Function Up: itemcontainer - Tool Previous: itemcontainer.delete - Function


itemcontainer.get - Function



Package utility
Module misc
Tool itemcontainer


Recover value of specified item


Synopsis
get(item)


Arguments

item   Item name or number
    Allowed: String or integer


Returns
Glish variable



Description

This tool function recovers the specified variable into a Glish variable. You can specify the item either by its name or by its number.



Example
- include 'quanta.g';
T
- const i1 := itemcontainer();
- i1.set('type', 'boxcar');
T
- idx := i1.add(dq.quantity(10,'arcsec'));
- type := i1.get('type');
- type;
boxcar
- type := i1.get(1);
- type;
boxcar
- width := i1.get(2);
- width;
[value=10, unit=arcsec] 
- x := i1.get(idx);
- x;
[value=10, unit=arcsec]











next up previous contents index
Next: is_itemcontainer - Function Up: itemcontainer - Tool Previous: itemcontainer.delete - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15