[M3devel] introducing VAR in more places?

Jay jayk123 at hotmail.com
Mon Feb 11 12:28:01 CET 2008


ok thanks, done

> Subject: Re: [M3devel] introducing VAR in more places?> From: dragisha at m3w.org> To: jayk123 at hotmail.com> CC: m3devel at elegosoft.com> Date: Mon, 11 Feb 2008 12:04:09 +0100> > A piece of code, from the middle of somewhere...> > len:=Wr.Length(swr.wr);> data := TextWr.ToText(swr.wr);> VAR> s: Ctypes.char_star := M3toC.CopyTtoS(data);> ff: ADDRESS := LOOPHOLE(s, ADDRESS);> a: UNTRACED REF CHAR;> > spent: CARDINAL := 0;> checkSum: Word.T := 0;> BEGIN> a := ff;> WITH sum = NEW(Sumator) DO> sum.reset();> > > > On Mon, 2008-02-11 at 11:20 +0100, Dragiša Durić wrote:> > Why would we, when in M3 we can have blocks as statements? Isn't that a> > mechanism to localize scope even more?> > > > d> > > > On Mon, 2008-02-11 at 09:29 +0000, Jay wrote:> > > Does anyone else find it bothersome that you can't introduce VARs> > > anywhere? Kind of like in C++?> > > Ok, or if you grant that frame size doesn't matter THAT much, and the> > > compiler might do stack packing anyway, you can move all your locals> > > up top like typical C, but still, how about for the module> > > initializer?> > > Still it seems good to me to do manual stack packing since it is often> > > so easy..> > > WITH helps, but only for "relative constants".> > > > > > It would be nice if the code below could have still loops until t0 !=> > > t1, but the repeat condition is outside the scope in which t1 is> > > available. This feels quite lame..> > > > > > - Jay> > > > > > > > > > > > ______________________________________________________________________> > > > > > > Date: Mon, 11 Feb 2008 10:24:00 +0000> > > > To: m3commit at elegosoft.com> > > > From: jkrell at elego.de> > > > Subject: [M3commit] CVS Update: cm3> > > > > > > > CVSROOT: /usr/cvs> > > > Changes by: jkrell at birch. 08/02/11 10:24:00> > > > > > > > Modified files:> > > > cm3/m3-libs/m3core/src/time/WIN32/: Time.m3 > > > > > > > > Log message:> > > > no need for globals here..> > > > > > > > > > > > > > > > ______________________________________________________________________> > > Helping your favorite cause is as easy as instant messaging. You IM,> > > we give. Learn more.> -- > Dragiša Durić <dragisha at m3w.org>> 
_________________________________________________________________
Helping your favorite cause is as easy as instant messaging. You IM, we give.
http://im.live.com/Messenger/IM/Home/?source=text_hotmail_join
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20080211/0c0e4b3c/attachment-0002.html>


More information about the M3devel mailing list