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

Home » Public Forums » archive » Re: passing strings as arguments?
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: passing strings as arguments? [message #25226 is a reply to message #25225] Mon, 04 June 2001 14:13 Go to previous messageGo to previous message
mchinand is currently offline  mchinand
Messages: 66
Registered: September 1996
Member
In article <yx6h3d9gufti.fsf@socrates.Berkeley.EDU>,
<noymer@socrates.Berkeley.EDU> wrote:
> I am using Ronn Kling's PLOTSYM, the usage of which is:
>
> plot,x,y,psym=plotsym(/circle,scale=2,/fill)
>
> instead of /circle, one could use /box, /triangle, etc...
>
> I have something like:
>
> IF (condition) THEN myshape=string('/circle') ELSE
> myshape=string('/triangle')
> ENDIF
>
> and I want to pass the string "myshape" to plotsym as the
> first argument but I can't figure out how to do this in IDL 5.3.
>
> It seems not to like strings being passed there.
>
> TIA,
> Andrew


You could use the EXECUTE function. Something like

result=EXECUTE('plot,x,y,psym=plotsym('+myshape+',scale=2,/f ill)')

Hope that helps,

--Mike
--
--
Michael Chinander University of Chicago
m-chinander@uchicago.edu (773)834-5101 (Voice) (773)702-0371 (Fax)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: trouble compiling AIM routines (mac files on windows?)
Next Topic: Re: thick = 2 and postscript output

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

Current Time: Sat Oct 11 06:12:33 PDT 2025

Total time taken to generate the page: 0.95968 seconds