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 #46807 is a reply to message #46806] Wed, 04 January 2006 14:09 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
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)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[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: Sat Nov 29 20:27:19 PST 2025

Total time taken to generate the page: 1.36278 seconds