<<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=vector string, KWDUSED=KWDUSED, _EXTRA=_EXTRA

Parameters

command        in required type: string array

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

Keywords

FILENAMEIN        in default: for_createpro.pro

name of the procedure to be created.

KWDLIST        in type: 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       

obsolete, please pass directly your keywords through _EXTRA

_EXTRA       

Used to pass keywords to the created procedure.

Examples

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

Version history

Version

$Id: createpro.pro 269 2007-08-27 09:46:41Z pinsard $

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. - ends the procedure name with '.pro' if needed.

Statistics

McCabe cyclic 8
McCabe essential 1
McCabe modular design 1
Produced by IDLdoc 2.0.