ENTER Name
ENTER Purpose
Prompted entries allowing defaults. Help, IDL/DCL commands.
Category
Calling Sequence
value = enter(type, prompt, default, [exit_flag, help_text])
Inputs
type = Data type to return. in
Allowed types are:
'STRING' = string
'BYTE' = byte
'INTEGER' = integer
'LONG' = long integer
'FLOAT' = float
'DOUBLE' = double float
prompt = prompt string. in
Any occurence of $DEF in the prompt string
is replaced by the default value, so the
prompt message may display the default.
default = default value. in
help_text = text to display for ? command. in
String or string array for multiple lines.
$DEF in the help string is replaced by
the def. value.
Keyword Parameters
Outputs
exit_flag = exit status flag. out
Valid values are:
0 = normal exit.
1 = quit on return.
-1 = backup to last entry.
11 = invalid data type.
12 = def. val. cannot convert to desired
data type.
value = returned value of desired type. out
Common Blocks
Notes
Notes: The following commands are allowed as ENTER entries:
Value requested.
Null entry. Gives default value
(for calling error may return error flag).
Expressions. Processes given IDL expression.
Q. Returns quit value (1) in exit flag.
B. Returns backup value (-1) in exit flag.
IDL statment. Executes given IDL statement.
$ statement. Executes given shell statement.
Modification History
R. Sterner. 17 Oct, 1986.
RES 9 OCT, 1989 --- CONVERTED TO SUN.
RES 13 Nov, 1989 --- put $DEF in prompt and help_text.
R. Sterner, 27 Jan, 1993 --- dropped reference to array.
Dr. Jenny Lovell, CSIRO Earth Observation Centre, Australia
Fixed a bug in testing if input is a number.
R. Sterner, 2010 May 04 --- Converted arrays from () to [].
Copyright (C) 1986, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.