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 #70582 is a reply to message #70580] Thu, 22 April 2010 14:29 Go to previous messageGo to previous message
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
On Apr 22, 5:16 pm, mgalloy <mgal...@gmail.com> wrote:
> 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

Haha. I always forget about this, since I only index arrays with []
thanks to my c++ background.
[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 20:07:04 PDT 2025

Total time taken to generate the page: 0.45839 seconds