Re: [Cobolforgcc-devel] MOVE subroutine in UNSTRING
Status: Pre-Alpha
Brought to you by:
timjosling
From: Tim J. <te...@me...> - 2001-04-08 21:06:08
|
Steven, I have written the move code but I am not supporting right justified at present. The alpha moves are being done by directly generated code in the compiler rather than by runtime routines so fortunately there is no module I will be able to send you for that. The runtime routines I have written (and tested yesterday) are all to do with num->X and x->num. I suggest that you add a flag for left/right justified to the receiving area description for alphanumeric fields. In 6.27.3 (2) states that the receiving areas have to be alphanumeric (fortunately), so the numeric issue should not arise. By the way the same problem would arise with cobr_string.c as well - support for right justified. I will add a bug report so I don't forget it. Tim Josling "Steven O. Ellis" wrote: > > Tim, > > The UNSTRING statement, conceptually at least, has an embedded MOVE in > it. I understand from recent messages on the mailing list that you are > working on MOVE. Please let me know when you have a first draft, so > that I may "borrow" from it when coding UNSTRING. Meanwhile, I will > work on test cases, and rest of the prototype. Here is the relevant > clause from the 1985 Standard, referring to a subset of characters from > the source area to be moved to one of the receiving areas. > > 6.27.4 General Rules > > (13) c. The characters thus examined (excluding the delimiting > character(s), if any) are treated as an elementary alphanumeric > data item, and are moved into the current receiving area > according to the rules for the MOVE statement. (See page VI-103, > The MOVE Statement.) > > This becomes nontrivial when you consider that the receiving area may be > defined as signed numeric or alphanumeric right-justified. > > Steven > > _______________________________________________ > Cobolforgcc-devel mailing list > Cob...@li... > http://lists.sourceforge.net/lists/listinfo/cobolforgcc-devel |