Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1556 |
|
Package | utility | |
Module | misc | |
Tool | aipsrc |
drc.findint(x, 'test.int' , 5, 'km', 'm')will assume that if the keyword is not present, the value of 5 is returned in x. If the keyword is given, but has no units specified, it will be assumed that the user has given the value in 'km'. The value returned will be converted to 'm' (i.e. thousand times bigger). If the user has specified units, the value returned will be converted to these ('m' in this case).
test.int: 2.9 test.int2: 2.9hmThe following will be the result:
- arc:=aipsrc() - arc.findint(x, 'test.int') T - x 2 - arc.findint(x, 'test.int1') F - x 0 - arc.findint(x, 'test.int1', 7) F - x 7 - arc.findint(x, 'test.int', 7, 'm', 'km') T - x 0 - arc.findint(x, 'test.int', 7, 'km', 'm') T - x 2900 - arc.findint(x, 'test.int1', 7, 'km', 'm') F - x 7 - arc.findint(x, 'test.int2', 7, 'km', 'm') T - x 290 - arc.findint(x, 'test.int2', 7, '', '') T - x 290 - arc.findint(x, 'test.int2', 7) T - x 2 - arc.done() # remove tool
value | The value of the resource (Out) | ||
Allowed: | Int | ||
keyword | The name of the resource to look up (In) | ||
Allowed: | String | ||
def | Default value to use if keyword not found | ||
Allowed: | Numeric | ||
Default: | 0 | ||
undef | Default units to use if none given in aipsrc file | ||
Allowed: | valid unit string | ||
Default: | F | ||
unres | The units the result will be converted to before giving the value from aipsrc file | ||
Allowed: | valid unit string | ||
Default: | F |