Path: utzoo!attcan!uunet!bu.edu!rpi!clotho!multics From: multics@clotho.acm.rpi.edu (Richard Shetron) Newsgroups: comp.lang.c++ Subject: Re: Cardinal numbers or unsigned int.. Message-ID: Date: 3 Jun 90 16:22:04 GMT References: <1990May25.193305.14920@Neon.Stanford.EDU> <2875@demo.COM> Reply-To: multics@clotho.acm.rpi.edu (Richard Shetron) Distribution: comp Organization: The Voice of Fate Lines: 29 How about the declaractions in PL/1. declare a fixed bin (7), b fixed bin(15), c fixed bin(31); which gives you an 8 bit binary integer for a, a 16 bit binary integer for b, and a 32 bit binary integer for c. The sign bit is not included in the bit count. YOu can also declare items as unsigned and full PL/1 compilers support unalingned data types as well. You also have: declare x float bin(24), y float bin(56); /* IBM 360/370 forms */ These specify the equivalent of a c float and double. The (precision) is optional and I'm not sure of the defaults on all machines, but on IBM 360/370 and Multics fixed bin defaults to half word (15 IBM, 17 Multics), and float bin to full word. instead of bin you could say decimal if you needed decimal storage and arithmetic instead of binary. If something is fixed you can optionally specify the location of the 'decimal' point. FOr those interested the keyword real is assumed. any of the above could also be declared complex if you need complex numbers and arithmetic. The compiler is always free to supply more precision then the programmer asked for, but will give warnings/error messages if it can't meet the requirement. It was nice haveing float dec(59) on Multics for some statistical work I did. It might have been slower then float bin, but I didn't need to develope software multi variable precision routines to get my answers. A good bureaucracy is the best tool of oppression ever invented. Richard Shetron USERFXLG@rpi.mts.edu multics@clotho.acm.rpi.edu