NAME:createpro
PURPOSE: write an idl procedure, compile it and execute it.
CATEGORY:
CALLING SEQUENCE:createpro, command
INPUTS:
command: a string array defining the procedure to be created.
each element will be a line of the created procedure.
KEYWORD PARAMETERS:
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'
_EXTRA: used to pass your keywords to the created procedure.
OUTPUTS: none
COMMON BLOCKS: none
SIDE EFFECTS: ends the procedure name with '.pro' if needed
RESTRICTIONS:is not working with functions, use createfunc instead.
arguments can be given only through keywords
EXAMPLE:
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