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

[GNU-COBOL] PIC -> edit masks -> a standard large numeric representation




 
"Edit masks"

Sounds like a reasonable standard internal representation for
numeric data would be a 64 bit integer and a 8-bit edit mask
with bits in it set for the various switches.

The "edit mask generator" would parse PIC into edit masks.

#include <sys/types.h>
typedef struct _NumericAtom{
	unsigned short editmask;
	int_64_t numdata;
} NumericAtom;


Records could then be stored as arrays of these 10-byte things, 

A COBOL to C converter could associate the name of the field
with the offset into the array structure.


and the C compiler would worry about efficiency issues.

A-type data could overrun several NumericAtoms





_______________________________________________________
               David Nicol 816.235.1187 nicold@umkc.edu
      Vendor extensions are quicksand -- Chad Slaughter

--
This message was sent through the gnu-cobol mailing list.  To remove yourself
from this mailing list, send a message to majordomo@lusars.net with the
words "unsubscribe gnu-cobol" in the message body.  For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@lusars.net.