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

Home » Public Forums » archive » Re: Compilation error with code from ENVI Help
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Compilation error with code from ENVI Help [message #41939] Mon, 29 November 2004 19:35 Go to next message
Peter Mason is currently offline  Peter Mason
Messages: 145
Registered: June 1996
Senior Member
Neil. wrote:
<...>
> ; Create the map information
> map_info = envi_map_info_create (/geographic, mc=mc1, ps=ps1)
>
> I get a compilation error on the "map_info = ......" line and I have
> no idea why. I'm quite new to programming, and slowly becoming
> acquainted with the alien logic required, but this code is copied
> directly from the examples in ENVI Help!


Hi Neil,

You have encountered a fairly rich form of alien logic here. The short of
it is that IDL decided that envi_map_info_create() is an array (not a
function), then choked on the keywords. In the words of RR: "It's a
tradition, an old charter, or something."

Try one of these to sort it out:

1] Include the statement FORWARD_FUNCTION ENVI_MAP_INFO_CREATE at the start
of your .PRO file.
2] Include the statement COMPILE_OPT STRICTARR or (even better) COMPILE_OPT
IDL2 at the start of the procedure / function that calls
envi_map_info_create. Or just make a habit of putting it at the start of
each one, to avoid the array / function ambiguity more generally.

Cheers
Peter Mason
Re: Compilation error with code from ENVI Help [message #42085 is a reply to message #41939] Wed, 15 December 2004 15:15 Go to previous message
Neil Sims is currently offline  Neil Sims
Messages: 2
Registered: December 2004
Junior Member
Thanks Peter
Compile_opt idl2 works a treat.
Chhers. Neil.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Feature extraction of shape in raster image
Next Topic: Help with interactive cursor and the draw widget (long)

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

Current Time: Wed Oct 08 18:59:49 PDT 2025

Total time taken to generate the page: 0.00481 seconds