Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1556 |
|
Package | utility | |
Module | misc | |
Tool | aipsrc |
drc.findfloat(x, 'test.float' , 5, 'h', 'd')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 'h'. The value returned will be converted to 'd' (i.e. twenty-four times smaller). If the user has specified units, the value returned will be converted to these ('d' in this case).
test.float: 5 test.float2: 5:30 test.float3: 5aThe following will be the result:
- arc:=aipsrc() - arc.findfloat(x, 'test.float') T - x 5 - arc.findfloat(x, 'test.float1') F - x 0 - arc.findfloat(x, 'test.float1', 7) F - x 7 - arc.findfloat(x, 'test.float', undef='h', unres='d') T - x 0.208333333 - arc.findfloat(x, 'test.float2', undef='h', unres='d') T - x 0.229166667 - arc.findfloat(x, 'test.float3', undef='h', unres='d') T - x 1826.25 - arc.done() # remove tool
value | The value of the resource (Out) | ||
Allowed: | Double | ||
keyword | The name of the resource to look up (In) | ||
Allowed: | String | ||
def | Default 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 |