|
Re: Keyword_Set function [message #46094 is a reply to message #46091] |
Wed, 02 November 2005 09:26   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
shi_lee@hotmail.com writes:
> hi, thanks. d_vectrack is a rather large function, im taking the first
> couple of lines that involves keyword_set:
>
> PRO d_vectrack, $
> state, $
> LOADDATA=fname, $
> WIDTH = fWidth, $
> RECORD_TO_FILENAME=record_to_filename, $
> GROUP=group, $ ; IN: (opt) group identifier
> DEBUG=debug, $ ; IN: (opt)
> APPTLB = appTLB, $ ; OUT: (opt) TLB of this
> application
> INITIALIZE = initialize
> REDRAW = redraw
I think I would put a comma and line continuation character
after the INITIALIZE keyword. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: Keyword_Set function [message #46095 is a reply to message #46094] |
Wed, 02 November 2005 09:20   |
IDLmastertobe
Messages: 54 Registered: June 2004
|
Member |
|
|
hi, thanks. d_vectrack is a rather large function, im taking the first
couple of lines that involves keyword_set:
PRO d_vectrack, $
state, $
LOADDATA=fname, $
WIDTH = fWidth, $
RECORD_TO_FILENAME=record_to_filename, $
GROUP=group, $ ; IN: (opt) group identifier
DEBUG=debug, $ ; IN: (opt)
APPTLB = appTLB, $ ; OUT: (opt) TLB of this
application
INITIALIZE = initialize
REDRAW = redraw
COMMON scivis, scivislist, dinfo, xoffset, yoffset
print,'*********************************************@ PRO d_vectrack'
xdim = 600
ydim = 600
adim=130
dpath='..\part-16\'
dat='tperp.gda'
file=dpath+dat
z_r = intarr(2);
x_r = intarr(2);
y_r = intarr(2);
IF (N_ELEMENTS(fWidth) EQ 0) THEN fWidth = 1.0
IF (N_ELEMENTS(fname) NE 0) THEN BEGIN
END ELSE BEGIN
IF KEYWORD_SET(initialize) THEN BEGIN
!clean = 1
frame3d = state.frame ;---------------get data
transform = lindgen(26)
curr_data = total(state.data_index*transform)
dinfo(*).threed2 = 1
im = scivis_get(curr_data,frame3d,/THREED2)
ENDIF
IF KEYWORD_SET(redraw) THEN BEGIN
if(!smo gt 0) then begin
im = SMOOTH(state.Image, !smo)
endif else begin
im = state.Image
endelse
ENDIF
let me know if you need more. thanks.
|
|
|
|
Re: Keyword_Set function [message #46191 is a reply to message #46094] |
Fri, 04 November 2005 00:55  |
wmconnolley
Messages: 106 Registered: November 2000
|
Senior Member |
|
|
David Fanning <david@dfanning.com> wrote:
> shi_lee@hotmail.com writes:
>> PRO d_vectrack, $
>> state, $
>> LOADDATA=fname, $
>> WIDTH = fWidth, $
>> RECORD_TO_FILENAME=record_to_filename, $
>> GROUP=group, $ ; IN: (opt) group identifier
>> DEBUG=debug, $ ; IN: (opt)
>> APPTLB = appTLB, $ ; OUT: (opt) TLB of this
>> application
>> INITIALIZE = initialize
>> REDRAW = redraw
> I think I would put a comma and line continuation character
> after the INITIALIZE keyword. :-)
How dull. Wouldn't it be more entertaining to re-write the
parser to understand this code... its perfectly clear to humans what
was meant :-)))
-W.
--
William M Connolley | wmc@bas.ac.uk | http://www.antarctica.ac.uk/met/wmc/
Climate Modeller, British Antarctic Survey | Disclaimer: I speak for myself
I'm a .signature virus! copy me into your .signature file & help me spread!
|
|
|