<<prev file | next file >>    view single page | view frames    summary: fields | routine    details: routine

Utilities/

createpro.pro

write an idl procedure, compile it and execute it.

topcreatepro

createpro, command, FILENAMEIN=FILENAMEIN, KWDLIST=KWDLIST, KWDUSED=KWDUSED, _extra=_extra

Parameters

command        in required

a string array defining the procedure to be created. each element will be a line of the created procedure.

Keywords

FILENAMEIN       

name of the procedure to be created. 'for_createpro.pro' by default

KWDLIST       

a vector string. to specify a list of keywords that must be included in the procedure definition. Warning: the string must start with a ',' for example: KWDLIST = ', TOTO = toto'

KWDUSED       

_extra       

used to pass your keywords to the created procedure. SIDE EFFECTS: ends the procedure name with '.pro' if needed

Examples

IDL> createpro, ['print,''OK'''], filename='test' IDL> createpro, ['if keyword_set(ok) then print,''OK'' else print, ''No'''] $ IDL> , filename = 'test', kwdlist =', ok = ok' IDL> createpro, ['if keyword_set(ok) then print,''OK'' else print, ''No'''] $ IDL> , filename = 'test', kwdlist = ', ok = ok', /ok

Version history

History

Sebastien Masson (smasson@lodyc.jussieu.fr) cleaning + new keywords: October 2005 Feb. 2006: supress keyword "kwdused" and use call_procedure instead of execute

Known issues

Restrictions

is not working with functions, use createfunc instead. arguments can be given only through keywords
Produced by IDLdoc 2.0.