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

Home » Public Forums » archive » brain twister
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
brain twister [message #22809] Fri, 08 December 2000 08:31
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Okay, enough ideology for one week. Here are some brain twisters for
you. See if you can decide what the output should be without running
it. In each example I give the commands to paste into the command
line, ending with some main-level commands to enter.

----- Example 1
.comp
pro test1, x, y
help, x, y
end

a = dindgen(5)
test1, a, a

----- Example 2
.comp
function test2, x
return, x
end

a = dindgen(5)
(test2(a))[2] = -2
print, a

These were a bit of a surprise for me!
Craig


--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Previous Topic: Re: IDL and RedHat version 7.0
Next Topic: WNT environmental vars

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

Current Time: Wed Oct 08 19:13:18 PDT 2025

Total time taken to generate the page: 0.00386 seconds