You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TestCase "Latest score"
MOVE '100,0,90,30' TO WS-SCORES
MOVE "latest" TO WS-PROPERTY
PERFORM HIGH-SCORES
EXPECT WS-RESULT = 30
In HIGH-SCORES, WS-SCORES needs to UNSTRINGed into a table. Another option is to move '100000090030' to WS-SCORES and decompose the data with working-storage structures.
Assuming a WS-SCORES-TABLE with sufficient space to hold the elements, an instruction 'MOVE-EACH' is suggested that parses the supplied list of values into the table, e.g.
MOVE-EACH 100,0,90,30 TO WS-SCORES-TABLE
If the table is of strings, allow for the MOVE-EACH to handle then viz
MOVE-EACH 'Agaricomycetes','Arthoniomycetes','Coniocybomycetes','Dothideomycetes','Eurotiomycetes','Lecanoromycetes','Lichinomycetes','Sordariomycetes' TO WS-LICHEN-FUNGAL-CLASSES-TABLE
The text was updated successfully, but these errors were encountered:
Hi @axtens
Thank you for your interest in COBOL Check :-)
Just to clarify: you would want to use the MOVE-EACH statement instead of the first MOVE statement in your example?
If you wanted to use it in HIGH-SCORES, it would be out of scope for COBOL Check, and would have to be added as an ordinary COBOL statement.
It's a suggestion to extend the command set for cobolcheck itself. There's no MOVE-EACH in the COBOL dialect I use (GnuCOBOL) and likely never will be.
The suggestion comes from having to write my COBOL in such a way asto be able to use cobolcheck to test my COBOL.
Currenly the test case says
In HIGH-SCORES, WS-SCORES needs to UNSTRINGed into a table. Another option is to move '100000090030' to WS-SCORES and decompose the data with working-storage structures.
Assuming a WS-SCORES-TABLE with sufficient space to hold the elements, an instruction 'MOVE-EACH' is suggested that parses the supplied list of values into the table, e.g.
If the table is of strings, allow for the
MOVE-EACH
to handle then vizThe text was updated successfully, but these errors were encountered: