Problem Compiling and Using Functions [message #46809] |
Wed, 04 January 2006 14:01 |
someone[1]
Messages: 2 Registered: January 2006
|
Junior Member |
|
|
I'm having trouble getting simple functions to work. I have the code
below in a single file named extract_tiles.pro. When I try and compile
it gives me a syntax error on the line containing
"extract_tiles_get_tile(fid)" in the extract_tiles procedure. If I
change the function to a procedure, comment out the return statement
and change the function call to a procedure call it works perfectly.
It's probably a simple error, but I can't figure it out. I'm using IDL
5.6 and ENVI 3.6.
FUNCTION extract_tiles_get_tile, fImg
ENVI_FILE_QUERY, fImg, ns=ns, nl=nl
print, 'Samples: ', ns
print, 'Lines: ', nl
RETURN, 0
END
PRO extract_tiles
ENVI_OPEN_FILE, 'image.dat', r_fid=fid
extract_tiles_get_tile(fid)
END
Thanks,
Mike
|
|
|