On Friday 08 November 2013 00:39:58 Sieghard wrote: > > The subrange method even might allow ranges of "non-binary" size, i.e. > such that don't use the full range of values a given number of bits can > represent, making it even more difficult to recognize the required number > of bits for a field. > You might specify a data structure taking the same area as above like this: > > Register = RECORD > Field_1: 0..77; > Field_2: 1..3; > Field_3: 5..25; > Field_4: 111..112; > Field_5: -2..-1; > END; > (where I assumed that you would allow for negative range limits also.) > BTW, as these are real subranges, what about limit checking? > > Although this approach certainly is the most flexible, it might be > considered as a rather obscure notation, requiring quite an amount of > decoding to assess the real size of the data. > Agreed. Maybe IvankoB's proposal to define integer types by subrange should be changed to define signed/unsigned and bit count. Which syntax?
Martin ------------------------------------------------------------------------------ November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk _______________________________________________ mseide-msegui-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

