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

Home » Public Forums » archive » reverse problem
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: reverse problem [message #46183 is a reply to message #46053] Fri, 04 November 2005 08:25 Go to previous messageGo to previous message
Paolo Grigis is currently offline  Paolo Grigis
Messages: 171
Registered: December 2003
Senior Member
R.G. Stockwell wrote:
> I think I have resolved the issue. I'd guess it is a namespace problem.
> I had a keyword "reverse" as well as the function "reverse()".
> This is using the default compiler options (i.e. I am not setting anything).

Another example which shows how bad it is to have round
parenthesis syntax allowed for both arrays and functions...

one would guess that probably the keyboard of whomever
invented the first version of IDL syntactic rules lacked
the keys for [] ;-)

Ciao,
Paolo

P.S.
print,namespacecrash(array,rev=2) is also quite funny

>
>
> So if you start of a fresh IDL, and type
> IDL> .run namespacecrash
>
> % Compiled module: NAMESPACECRASH.
>
> % Compiled module: $MAIN$.
>
> 0.000000 1.00000 2.00000 3.00000 4.00000
>
> 1 1 1 1 1
>
>
>
>
> Here is the routine:
>
> function namespacecrash,array,reverse = reverse
>
> if keyword_set(reverse) then begin
> array = reverse(array)
> endif
>
> return,array
> end
>
> array = findgen(5)
>
> print,namespacecrash(array)
>
> print,namespacecrash(array,/rev)
> end
>
>
>
> My results are:
> % Compiled module: NAMESPACECRASH.
>
> % Compiled module: $MAIN$.
>
> IDL> .GO
>
> 0.000000 1.00000 2.00000 3.00000 4.00000
>
> 1 1 1 1 1
>
> IDL> help,!version,/st
>
> ** Structure !VERSION, 8 tags, length=76, data length=76:
>
> ARCH STRING 'x86'
>
> OS STRING 'Win32'
>
> OS_FAMILY STRING 'Windows'
>
> OS_NAME STRING 'Microsoft Windows'
>
> RELEASE STRING '6.1.1'
>
> BUILD_DATE STRING 'Oct 11 2004'
>
> MEMORY_BITS INT 32
>
> FILE_OFFSET_BITS
>
> INT 64
>
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: online help IDL 6.2
Next Topic: Printinf Latitudes & Longitudes in a MAP using IDL

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

Current Time: Fri Oct 10 15:26:46 PDT 2025

Total time taken to generate the page: 1.19389 seconds