[M3devel] the LONGINT proposal

hendrik at topoi.pooq.com hendrik at topoi.pooq.com
Mon Jan 11 17:23:01 CET 2010


On Mon, Jan 11, 2010 at 12:14:06PM +0000, Jay K wrote:
> 
> There is some disagreement floating around apparently on even what
> to call the INTEGER <=> LONGINT conversions.
> Currently ORD converts to INTEGER.
> Randy's proposal I believe converts to the underlying type: INTEGER or LONGINT.
> And I think uses VAL(expr, INTEGER or LONGINT) to convert to INTEGER or LONGINT.
> 
> 
> I believe I saw a proposal that the converesions be named after the type:
>   INTEGER(expr), LONGINT(expr).
> 
> That kind of smacks to me of "too hard to search for".
> 
> Here is a crazy verbose suggestion:
>  LOOPHOLE(integer or subrange or enumeration or longint, INTEGER or LONGINT)
> 
> and allow it in safe modules?
> At least it is existing syntax with roughly the desired meaning,
> except that LOOPHOLE is and sounds unsafe.
> 
> CAST(expr, type)
> CONVERT(expr, type)
> ?
> 
> I'm just making up words here of course.
> VAL or ORD seem sufficient, esp. if you can specify the type.

NARROW?  WIDEN?

And TRUNCATE if you really want to chop off the high-order bits without 
overflow check?

-- hendrik



More information about the M3devel mailing list