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

Home » Public Forums » archive » Determining a safe variable name from a string
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Determining a safe variable name from a string [message #51033] Tue, 31 October 2006 09:53
Ben Panter is currently offline  Ben Panter
Messages: 102
Registered: July 2003
Senior Member
Hi Folks,

I'm sure I've seen this here before, but extensive googling didn't
trawl anything up. I'd like to be able to convert a random string into
something I can use for a variable name (heavy execute'ing going on
here). Something that clears out all the ./*/&//'s and the like. Ideally
it would replace them with something useful, realistically I'd be happy
if it just removed the unsafe characters from the string.

something like:

res=wonderful_routine('vmax_z0.1_0.3')
print, res
vmax_z0p1_0p3

I've already written something similar which I can butcher, but I'm
sure there was an IDL routine that did this already?

Many thanks,

Ben



--
Ben Panter, Edinburgh, UK.
Email false, http://www.benpanter.co.uk
or you could try ben at ^^^^^^^^^^^^^^^
[Message index]
 
Read Message
Previous Topic: Re: MPFIT2DFUN
Next Topic: Re: xobjview creates phantom font object?

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

Current Time: Wed Oct 08 19:02:17 PDT 2025

Total time taken to generate the page: 0.00446 seconds