gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-cobol-list] Accept/display with position


From: Giroud, Bernard
Subject: Re: [open-cobol-list] Accept/display with position
Date: Tue Nov 2 23:31:05 2004
User-agent: Mozilla/5.0 (Windows; U; Win98; fr; rv:1.5) Gecko/20031013 Thunderbird/0.3

Walter Garrote a écrit :

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,

Thanks for your suggestion; I'll take a look at it.

We know we have progress to do on that side.

Ferran Pegueroles made a tremendous work to support screen interaction within TinyCOBOL.
I'll recommend to have at least in in depth reading of the code.

Walter


--
Bernard Giroud
Open Source COBOL Tools Developer





reply via email to

[Prev in Thread] Current Thread [Next in Thread]