Utilities/
createfunc.pro
write an IDL function, compile it and execute it.
useful to avoid the use of execute
createfunc
result = createfunc(command, FILENAMEIN=FILENAMEIN, KWDLIST=KWDLIST, _EXTRA=_EXTRA)
Parameters
command
in
required
a scalar string defining the result to be given back by the function.
(see examples)
Keywords
FILENAMEIN
in
default: for_createfunc.pro
name of the function to be created.
KWDLIST
in
a vector string. to specify a list of keywords that must be included in the
function definition.
Warning: the string must start with a ','
for example: KWDLIST = ', TOTO = toto'
_EXTRA
used to pass your keywords to the created function.
Examples
IDL> print, createfunc('3*2', filename='test')
IDL> print, createfunc('3*two', filename = 'test' $
IDL> , kwdlist ='two = two', two = 2)
Version history
Version
$Id: createfunc.pro 136 2006-07-10 15:20:19Z pinsard $
History
Sebastien Masson (smasson@lodyc.jussieu.fr)
May 2005
Known issues
Restrictions
- arguments can be given only through keywords;
- ends the function name with '.pro' if needed.
Produced by IDLdoc 2.0.