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

Home » Public Forums » archive » Re: baffling syntax error
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: baffling syntax error [message #70583 is a reply to message #70582] Thu, 22 April 2010 14:16 Go to previous messageGo to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 4/22/10 3:03 PM, Gray wrote:
> Hi all,
>
> I have a function declaration with both positional and keyword
> parameters like this:
>
> FUNCTION WR_subtract, imga, imgb, WARP_DEG=wdeg, SKY_STYLE=skyst, $
> SCALE_STYLE=scast
>
> ...and in another procedure I call the function like this:
>
> interp_res =
> wr_subtract(intrp,civ,warp_deg=3.,sky_style=1,scale_style=1)
>
> However, that function call gives me a syntax error when I try to
> compile:
>
> interp_res =
> wr_subtract(intrp,civ,warp_deg=3.,sky_style=1,scale_style=1)
> ^
> % Syntax error.
>
> Why the error??
>
> Thanks!
> --Gray

I would guess that IDL thinks that "wr_subtract" is an array and you
invalidly indexing it. Fix this with a "compile_opt strictarr" statement
at the beginning of the routine that *calls* wr_subtract (and, of
course, by using []'s, not ()'s, to index arrays inside that routine).

Mike
--
www.michaelgalloy.com
Research Mathematician
Tech-X Corporation
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: I calculated longwave radiation using readcol function from IDL-astro: Output file looks crazy. (T.T)
Next Topic: paypal wholesale men's shoes (paypal payment) sneakers

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

Current Time: Wed Oct 08 14:12:03 PDT 2025

Total time taken to generate the page: 0.00228 seconds