Welcome to iraf.net Tuesday, May 21 2024 @ 06:30 PM GMT
dbrenner |
05/05/2006 01:11PM (Read 4060 times)
|
|
|
Status: offline
Registered: 05/05/2006
Posts: 115
|
I have a variable object.name which is equal to HIP 1234.
The query '(object == "@@object.name")' does not seem to work although there is a header object with HIP 1234 as the object
What's wrong?
|
|
|
|
fitz |
05/05/2006 01:11PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
When you say "variable object.name" do you literally mean a script variable (perhaps python?) or do you mean 'variable' in the sense it is used in the HEDIT help page where it refers to a header parameter keyword? In either case I'm confused since the period in the name should be invalid.The @ operator dereferences a keyword value and is usually only needed for keywords with a '-' in them, so for instance(object ?= @o-name)would test the value of the 'object' keyword against the value of the 'o-name' keyword. Note the use of the '?=' string comparison operator which is different than '=='. If what you have is a script variable and you're trying to construct an expression using the value, then you need to do something like[code:1:ce1b149f30]cl> s1 = "(object ?= '" // namevar // "')"
cl> hselect ("myimg", "$I,stuff", s1)[/code:1:ce1b149f30]where the first line is simply the concatenation of 3 strings and the second is executed in 'compute mode' so the s1 variable is dereferenced properly by the CL.Hope this helps, if you still have questions please post more details on what you're trying to do exactly.Cheers,
-Mike
|
|
|
|
dbrenner |
05/05/2006 01:11PM
|
|
|
Status: offline
Registered: 05/05/2006
Posts: 115
|
Thanks.
|
|
|
|
| |
|
Content generated in: 0.12 seconds |
|