Kbase 11856: Language - PROMPT-FOR error 402 using named frames
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/05/1998 |
|
Language - PROMPT-FOR error 402 using named frames
Error (402) : PROMPT-FOR var x should be used with input
prefix or assigned
The following example will illistrate the above error message:
DEFINE var x as integer.
DEFINE var y as integer.
FORM x y with FRAME a.
FORM x with FRAME b.
REPEAT with FRAME a:
PROMPT-FOR x y.
ASSIGN x y.
message "x=" input x "y=" input y.
end.
You need to specify the FRAME name in the input statement.
'MESSAGE "x=" input frame a x "y=" input frame a y.
Since the field "x" is scoped to two different frames, PROGRESS will
use the first one it finds to do the PROMPT-FOR on. The first one
that it finds is in the screen buffer. The ASSIGN looks at the
frames but will not know where to get the value from as the variable
is in more than one frame. Since PROGRESS can't figure it out, it
will not do anything with the assign part of the statement. When you
run the code and enter a value in the x field. It will not be
assigned.
By putting the FRAME frame-name into the INPUT statement,
PROGRESS will know which frame to get the INPUT from and both
the error 402 and the un-assigned var x problem will be resolved.
Progress Software Technical Support Note # 11856