RE: [Cobolforgcc-devel] COMPUTE and MOVE 2002
Status: Pre-Alpha
Brought to you by:
timjosling
From: William M. K. <wm...@ix...> - 2001-04-01 21:49:33
|
I believe that the MOVE rules in the FCD are all written talking about "numeric" items as either INTEGER or NON-INTEGER. The BINARY-xxxx items *are* integer, the FLOAT-xxxx depend on whether or not STANDARD arithmetic is in effect and what the "evaluate" to. Rules that "explicitly" talk about sign or non-signed depend on the "singed" phrase for BINARY-xxxx. I believe that all the FLOAT-xxxx items are ALWAYS signed. Is there some specific rule that you have a question about? If you haven't already, look at the rules for "integers in general rules" on page 20 of the FCD. > -----Original Message----- > From: cob...@li... > [mailto:cob...@li...]On Behalf Of Tim > Josling > Sent: Sunday, April 01, 2001 4:24 PM > To: cobolforgcc-devel > Subject: [Cobolforgcc-devel] COMPUTE and MOVE 2002 > > > I have now implemented compute (compiler subset - no > overflow/size error; only the subset's supported data types). > Move is next. > > By the way Bill if you are reading this do you know what the > following code should do (in COBOL 2002)? > > 01 v1 usage binary-char signed value 123. > 01 v2 pic x(5). > > move v1 to v2. > display "*" v2 "*". > > Is the answer the same if v1 is unsigned? > > how about this? > > move "00123" to v2 > move v2 to v1 > display v1. > > The description of move in the standards seems to assume a PIC is > present for all elementary data items, but this is not so for > binary-* and also for the floating point types which have a > similar issue. > > Tim Josling > > _______________________________________________ > Cobolforgcc-devel mailing list > Cob...@li... > http://lists.sourceforge.net/lists/listinfo/cobolforgcc-devel |