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

Home » Public Forums » archive » Bug or desired behavior in lambda 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: Bug or desired behavior in lambda functions? [message #91152 is a reply to message #91146] Tue, 09 June 2015 08:42 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
Neat trick!

Thanks.

> I experimented with the same thing, I found this to work:
>
> IDL> expr='x: x^2
> IDL> l=lambda(expr)
> % LAMBDA: Code must be of the form "arg1,arg2,... : statement"
> % Execution halted at: $MAIN$
> IDL> l=lambda(''+expr)
> IDL> l(2)
> 4
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Identify whether value is integer in IF statement
Next Topic: Multiple Processing

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

Current Time: Wed Oct 08 17:56:13 PDT 2025

Total time taken to generate the page: 0.00244 seconds