[M3devel] Never ending love with alignments, data sizes et al :)

felipe valdez felipevaldez at gmail.com
Mon Aug 22 05:26:09 CEST 2011


maybe:

print(typeof(expression))

for each of these expressions:

1. LOOPHOLE(DUMMY_VAR, REAL);

2. NBOFrom(LOOPHOLE(f, Ctypes.unsigned))

3. LOOPHOLE(f, Ctypes.unsigned)

4. LOOPHOLE(NBOFrom(LOOPHOLE(f, Ctypes.unsigned)), REAL); <- line 28, of
course :)


is there a typeof operator in modula3, or a typeid operator in modula3?



On Sat, Aug 20, 2011 at 5:27 PM, Daniel Alejandro Benavides D. <
dabenavidesd at yahoo.es> wrote:

> Hi all:
> I think this is just a failed check (an over check) of what it is suppose
> to think, is better to assert type errors than false execution ill-behavior
> (since this is not the case) one's assumption may be over checked, and thus
> you get the type error (otherwise you would like need some to think like
> this, I'm not against it just that, but this is pure dreams in one big
> head):
> http://www.dorje.com/netstuff/jokes/prog.smurf
>
> http://venus.is.s.u-tokyo.ac.jp/amo/AMO-Berlin/index.html
>
> If you see it's akind of what you would want, type safe checking of C C++
> superset of it with Obliq-like language. It's written in Gnu C. It's JIT
>
> Thanks in advance
>
> --- El sáb, 20/8/11, Dragiša Durić <dragisha at m3w.org> escribió:
>
> > De: Dragiša Durić <dragisha at m3w.org>
> > Asunto: [M3devel] Never ending love with alignments, data sizes et al :)
> > Para: "m3devel" <m3devel at elegosoft.com>
> > Fecha: sábado, 20 de agosto, 2011 13:40
> > "../src/ArcGrid.m3", line 28:
> > LOOPHOLE: expression's size differs from type's
> >
> > PROCEDURE SwapFloat(f: REAL): REAL =
> >   BEGIN
> >     RETURN LOOPHOLE(NBOFrom(LOOPHOLE(f,
> > Ctypes.unsigned)), REAL); <- line 28, of course :)
> >   END SwapFloat;
> >
> > BITSIZE is 32 for both.
>



-- 
312-444-2124
Skype: f3l.headhunter
Casa: 8043901
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20110821/ebe99f17/attachment-0002.html>


More information about the M3devel mailing list