From: James Edward Gray II Date: 2006-07-01T09:59:30+09:00 Subject: Re: [QUIZ] C-Style Ints (#85) On Jun 30, 2006, at 4:41 PM, Josef 'Jupp' SCHUGT wrote: > Hi! > > At Fri, 30 Jun 2006 22:47:46 +0900, Ruby Quiz wrote: > >> Write a class that can represent a signed or unsigned number with an >> arbitrary number of bits. >> : >> irb(main):001:0> n = UnsignedFixedWidthInt.new(0xFF, 8) >> : >> irb(main):001:0> n = SignedFixedWidthInt.new(0x01, 8) > > Does "write a class" imply that UnsignedFixedWidthInt and > SignedFixedWidthInt are two different names for the just one class? Hmm, good point. Confusing wording there. Go with whatever method is easiest to implement. (I would probably make two classes.) James Edward Gray II