The current snapshot allows for specifying an AT clause and a WITH clause on DISPLAY and ACCEPT. These oddities are observed:
DISPLAY "hello" LINE 15 POSITION 20
is equivalent with
DISPLAY "hello" AT LINE 15 POSITION 20
DISPAY "hello" LINE 15 POSITION 20 WITH .....
DISPAY "hello" AT LINE 15 POSITION 20 WITH .....
all compile okay. But
DISPAY "hello" WITH ...... LINE 15 POSITION 20
does not recognize LINE and
DISPAY "hello" WITH .... AT LINE 15 POSITION 20
does not recognize AT.
The compiler demands obviously that AT and WIDTH are encountered in their very sequence whilst AT might be omitted and WITH may not be omitted.
The proposal is to allow for optional clauses AT and WITH, and that they may be in any order.
Add to this the syntax DISPAY OMITTED to allow for just screen positioning. The workaround is to code DISPLAY SPACE, which looks funny, is ambiguous (one space or padding complete screen?), and destroys at least one character on the screen.
Assigned to Ed as he does a lot of good work on the screen i/o.
@Ed, please leave a short note here: "yes/no" "in some months/soon". You're free to split this into multiple tickets (some of these points are likely duplicates, too).
Here's the ToDo:
DISPAY OMITTEDto allow for just screen positioning (I thought this was in already...)[AT] LINEissue Wim described in the ticketSimon
I can begin work on the first and fourth points and then
DISPLAY OMITTED. I'll think I'llleave the mixed-formatACCEPTstatement for now.Sounds good. You can either stop after the first parts (please open a new ticket for the missing parts then) or go on from this.
Simon
I'm struggling to fix a shift/reduce error. I essentially have the following:
The errror occurs in
display_atom. I'd like to shift as much into thex_listas possible and then reduce to either first or second cases (based on the presence of adisplay_atom_clause), but I'm not sure how to (or whether it's possible this way). Do you have any ideas on what to do?The following may help, or not...
Simon
No, I still get the same error.
Could be because of
display_atom_clauses, couldn't it? What does happen if you replace it by something likeSELECT { /* Ignore */ }(just for testing purposes)?Simon
Was correct, of course. If you cannot fix it directly then the %prec modfier should help.
Attached is the first version of the patch with most of the requested additions.
DISPLAY OMITTEDis omitted and only the screen and device formats of theDISPLAYstatement can be mixed (which I think is enough; do people really want to mix withDISPLAY ... UPON ARGUMENT-NUMBERorUPON ENVIRONMENT-VALUE?).Looks good. I see no reason for not comitting the patch and go on to DISPLAY OMITTED, if
make checkalland your manual testsuite and still work as expected and the posted sources by wim do, too.For DISPLAY OMITTED: ACCEPT set the tree for OMITTED to cb_null, resets it directly before the final cb_emit to NULL and the cob_accept function in libcob only waits if the passed field is NULL. Sounds like a plan for display, too :-)
Ed, looks like I missed something here.
Old version has:
and works perfectly for
while [r760] prevents this by
Can you please recheck this issue?
That's [bugs:#246], which I've been working on for the past week. I should have a fix ready soon.
Related
Bugs:
#246Thank you for the feedback. Looking forward to your change :-)
As of [r996], here is the status of all the requests:
DISPLAYformats: rejected. I don't have an ACUCOBOL compiler, so I'm not sure what they considered to be "unambiguous". All I know is that the more I thought about it, the less happy was that any mixing could be unambiguous. GnuCOBOL now follows the syntax of Micro Focus.DISPLAY OMITTED: not yet done. (In the meantime, you can useDISPLAY LOW-VALUE ...to move the cursor.)Last edit: Edward Hart 2016-07-18
@Edward: Is there any reason to not simply pass
cb_nullor a pendant forlow-valueto the display generation and do cursor position / belling as we do when the passed field islow-value?I think
DISPLAY OMITTEDis a more powerful version ofDISPLAY LOW-VALUE. For instance,DISPLAY OMITTED, SIZE 5, REVERSEcan be used to swap the colours of the five characters following the cursor. I'm not sure ifDISPLAY LOW-VALUE, SIZE 5, REVERSEhas the same effect.You're correct. Can you please set this as unfinished instead of PENDING and emit the simple NULL variant? This way we have it working for positioning an bell immediately and can see/check in some months (with a very low priority) if/how we want to change it. Or wait to receive a patch file from someone who needs this to work.
Done in [r1308].
@Ed: Thank you for your work in this area.
Release 3.1.2. DISPLAY OMITTED generates a libcob: error: codegen error.
Detected on android tablet using termux from f-droid.
gnuCobol packaged on januari 2022.
please see also FR #367 A way to change attributes (ex. colors) on the screen.
May be it is now implemented ? with
Ron Norman committed [r4555]
Implement DISPLAY OMITTED
Related
Commit: [r4555]