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

Home » Public Forums » archive » Re: Greek Symbols in Plot Annotations
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: Greek Symbols in Plot Annotations [message #69282 is a reply to message #69281] Mon, 11 January 2010 15:14 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Paul van Delst writes:

> Excellent. I no longer need to do stuff like
>
> Delta = !D.NAME EQ 'PS' ? '!9D!X' : '!4D!X'
> epsilon = !D.NAME EQ 'PS' ? '!9e!X' : '!4e!X'
>
> in my code! Woohoo!
>
> BTW, why not do something like
>
> IF !D.NAME EQ 'PS' THEN BEGIN
> DEVICE, /ISOLATIN1
> esc = '!9'
> ENDIF ELSE BEGIN
> esc = '!4'
> ENDELSE
>
> CASE StrLowCase(letter) OF
> 'alpha': greekLetter = (capital) ? String("101B) : String("141B)
> 'beta': greekLetter = (capital) ? String("102B) : String("142B)
> ...etc...
> ENDCASE
> greekLetter = esc + greekLetter + '!X'
>
> ?
>
> The only thing the CASE construct should be doing is selecting the right string element,
> right? All the other stuff (prefixing and suffixing with the escape sequences, testing for
> PS or not) can be done outside. Then you only need one CASE construct and the code is not
> so wet[*]. :o)

Have you even noticed that it is a hell of lot easier
to write code after the fact then it is while you are
actually doing it?

What I should do is wait three days after writing a new program
and e-mailing it to Maarten Sneep and Matt Savoie before
I let anyone else see it. If I did that, I'd be considered
a genius, probably. Those boys sure know how to pick good
ideas apart. And now Paul is piling on.

This is not starting out to be a good week. :-(

Cheers,

David

P.S. Of course, you are right. I'll see what I can do
do when I get over the embarrassment. :-)

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Removing if then else loop for efficiency
Next Topic: Re: pointer & structure

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

Current Time: Fri Oct 10 19:54:14 PDT 2025

Total time taken to generate the page: 1.43625 seconds