On Wednesday 13 November 2013 17:29:11 Michael Schnell wrote:
> On 11/13/2013 05:19 PM, Martin Schreiber wrote:
> > "
> > type
> >   recordty = bitpacked record
> >    x2: -2 to 1;
> >    x3: -2 to 1: 2; //same as above
> >    x4: 0 to 5: 4;  //subrange in 4 bits
> >   end;
> > "
>
> While I don't like to be forced to calculate the range manually from the
> intended bit count, this of course is possible
>
The range could default to the maximum of the bit size:
"
type
 boolty = : 8;          //bool8
 cardty = 0 to: 8;      //card8
 intty = -to: 8;        //int8
 charty = #0 to: 8;     //char8
 floatty = -. to .: 64; //flo64
 recordty
  b: : 8;         //bool8
  c: 0 to: 8;     //card8
  i: -to: 8;      //int8
  ch: #0 to: 8;   //char8
  f: -. to .: 64; //flo64
 end;
"
I don't like it.
Or with reserved words:
"
type
 boolty = max: 8;             //bool8
 cardty = 0 to max: 8;        //card8
 intty = smin to smax: 8;     //int8
 charty = #max: 8;            //char8
 floatty = -.max to .max: 64; //flo64
 recordty
  b: max: 8;            //bool8
  c: 0 to max: 8;       //card8
  i: smin to smax: 8;   //int8
  ch: #max: 8;          //char8
  f: -.max to .max: 64; //flo64
 end;
"
I don't like it, especially the "smin" "smax". We can't write "-max to max" 
because Sieghard will read it. ;-)

Martin

------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to