[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[open-cobol-list] Accept/display with position
From: |
Walter Garrote |
Subject: |
[open-cobol-list] Accept/display with position |
Date: |
Tue Nov 2 09:36:51 2004 |
Hello,
Today, i´ve just start using the open-cobol. My first test use the
accept/display with position. It´s like this:
identification division.
program-id. t1.
environment division.
configuration-section.
special-names. decimal-point is comma.
data division.
working-storage section.
01 n1 pic x(30).
01 n2 pic x(30).
01 n3 pic zzz.zzz.zz9,99.
procedure division.
main.
accept n1 at line 01 column 01.
accept n2 at line 02 column 01.
accept n3 at line 03 column 01.
cobc -save-temps -free t1.cbl
this will not run properly.
The variable current_program->flag_screen its set only if the program use
screen section.
I don´t understand the parser, but i have done some modifications.
parser.y
| _at line_number column_number { $$ = cb_build_pair ($2, $3);
current_program->flag_screen = 1; }
| _at column_number line_number { $$ = cb_build_pair ($3, $2);
current_program->flag_screen = 1; }
;
line_number:
LINE _number x { $$ = cb_build_cast_integer ($3);
current_program->flag_screen = 1; }
;
column_number:
COLUMN _number x { $$ = cb_build_cast_integer ($3);
current_program->flag_screen = 1; }
;
end_accept:
| END_ACCEPT
the compiler now understand that it´s necessary start the ncurses library
even if using accept with line/column position.
In file typeck.c there is a function named cb_emit_accept. This function has
write specialy to screen section and accept without position.
I want to develop the accept with position, but i have some difficult to
understand the code. Specially with the parser.(only one day :)
By the way, the compiler not func properly using screen section.
Thanks,
Walter
- [open-cobol-list] Accept/display with position,
Walter Garrote <=