comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Problem Compiling and Using Functions
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Problem Compiling and Using Functions [message #46806 is a reply to message #46805] Wed, 04 January 2006 14:48 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
David Fanning wrote:
> someone@someplace.com writes:
>
>
>> 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
>
>
> Functions return a value. Try writing the function call like this:
>
> void = extract_tiles_get_tile(fid)

Man, I heard the "D'OH!" all the way over here!

:o)


--
Paul van Delst
CIMSS @ NOAA/NCEP/EMC
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: archivos
Next Topic: Re: Unicode Question

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Nov 30 00:23:43 PST 2025

Total time taken to generate the page: 2.32305 seconds