Re: TLB_GET_SIZE - strangeness! [message #4494] |
Thu, 15 June 1995 00:00 |
David S. Foster/Admin
Messages: 14 Registered: May 1995
|
Junior Member |
|
|
Remember that SIZE() is an IDL function, so SIZE(0)
evaluates to a 3-element array containing dimension/
data-type info for the value 0.
Just use a different name for your variable.
Dave
|
|
|
Re: TLB_GET_SIZE - strangeness! [message #4539 is a reply to message #4494] |
Mon, 12 June 1995 00:00  |
sjt
Messages: 72 Registered: November 1993
|
Member |
|
|
T (kotsines@benji.Colorado.EDU) wrote:
: On the topic of re-sizing, can anyone explain the following:
: > B = WIDGET_BASE( title = 'testing' )
: > WIDGET_CONTROL, B, /REALIZE
: (re-size B to arbitrary size via the mouse)
: > WIDGET_CONTROL, B, TLB_GET_SIZE = size
: > print, size
: 209 273
: > help, size
: SIZE INT = Array(2)
: > print, size(0)
: 0 2 1
: > help, size(0)
: <Expression> LONG = Array(3)
: ...am I missing something? How can I access the two integer elements of size?
: Confused,
: Tom
Very simple. SIZE is an IDL function -- when you just give the name as in
"print, size" it gives the value of the variable but if you subscript it,
it then uses the function SIZE to return info on its argument.
Solution: change the name to (e.g.) SIZ_BAS
--
+------------------------+---------------------------------- --+---------+
| James Tappin, | School of Physics & Space Research | O__ |
| sjt@star.sr.bham.ac.uk | University of Birmingham | -- \/` |
| Ph: 0121-414-6462. Fax: 0121-414-3722 | |
+----------------------------------------------------------- --+---------+
|
|
|
Re: TLB_GET_SIZE - strangeness! [message #4597 is a reply to message #4539] |
Fri, 02 June 1995 00:00  |
Jyothi Kirani
Messages: 2 Registered: June 1995
|
Junior Member |
|
|
I think the problem is that you are using size as a variable to hold the table
size. Since size is also a key word the results you have got are confusing.
Try changing the variable name size to some other name. I tried it, it works.
-jyothi.
|
|
|