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

Home » Public Forums » archive » Help needed for a CASE statement, something subtle going on ...
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: Help needed for a CASE statement, something subtle going on ... [message #87817 is a reply to message #87782] Thu, 27 February 2014 09:33 Go to previous messageGo to previous message
john.hrv583 is currently offline  john.hrv583
Messages: 4
Registered: February 2014
Junior Member
On Wednesday, February 26, 2014 7:23:38 PM UTC-5, David Fanning wrote:
> Phillip Bitzer writes:
>
>
>
>> Then don't listen to this :-)
>
>>
>
>> If you absolutely *must* you can do this in a script. Here's the 1970's syntax (it's not pretty and *very* cumbersome)
>
>>
>
>> CASE x OF & $
>
>> 1: print, 'one' & $
>
>> 2: print, 'two' & $
>
>> 3: print, 'three' & $
>
>> 4: print, 'four' & $
>
>> ELSE: print, 'not one through four' & $
>
>> ENDCASE
>
>>
>
>> Again, this should be a last resort.
>
>
>
> I used to be one of thorough people, too. But, over the years, I've
>
> learned to give people just enough information to move one step forward.
>
> That's about all they can handle and stay productive. ;-)
>
>
>
> Cheers,
>
>
>
> David
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")


Hi, everyone,

Thank you all so much for your overwhelming responses and help.

Actually I am not just learning to use CASE statements in IDL, I'm learning
to use IDL per se. And as it so happened, yesterday I got stuck with the case
statement for quite a while, because I was trying out different things that
I learned recently. Basically, I had tried almost every option that you have
suggested regarding the CASE statement, but none of them worked. (In retrospect,
with your insightful explanations, I know that's because there was always something missing in my codes.) And I was really quite frustrated.

Then I thought what I really need is to find some step by step tutorials and get familiar with some of the "subtleties" of the IDL programming language. So I searched on the Internet. While doing so, I came across this discussion group. Because I did not find anything that would help solve my problem any time soon, I decided to try to ask for help in this discussion group. But I was quite unsure if I would get any response at all, because I thought although my problem is a big problem for me, people in this group might be tired of answering this kind of questions.

To my surprise, your responses proved that I am totally wrong again:-). And I think your responses are the best tutorials I can get, because in addition to solving my particular problem at hand, they also provided precise answers to some questions I have had since I started to learn IDL recently. This definitely saved me a lot of time that I would otherwise have to spend in looking for the answers in the documents etc. myself.

All in all, I really think that each and every response from you all is a treasure. And thank you so much again for your generosity in sharing your precious time and expertise!


John


P.S.: David, I intended to post my response so that everyone in the discussion group can see it. Since I am using such a discussion group for the first time,
I'm not sure if I'm doing it correctly. If not, please give me advice on how to
do it CORRECTLY. Thanks a lot in advance!

John
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Wrapping image on polar projection
Next Topic: Re: Guide: how to call Fortran from IDL in a portable and stardard F 2003 way

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

Current Time: Wed Oct 08 15:27:31 PDT 2025

Total time taken to generate the page: 0.00435 seconds