<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>If you want a precise scope in C++, just but in an opening brace.<BR>
Just like how in Modula-3 (now I know) you can have "BEGIN" almost anywhere, in C++ you can have an open brace almost anywhere. Ditto in C. It isn't often used though, granted.<BR>
<BR>
- Jay<BR><BR>
<HR id=stopSpelling>
<BR>
> CC: m3devel@elegosoft.com<BR>> From: hosking@cs.purdue.edu<BR>> Subject: Re: [M3devel] introducing VAR in more places?<BR>> Date: Mon, 11 Feb 2008 11:34:54 -0500<BR>> To: jayk123@hotmail.com<BR>> <BR>> You can, except you need to explicitly give the block scope:<BR>> <BR>> VAR ...<BR>> BEGIN<BR>> ...<BR>> END;<BR>> <BR>> I find this much better than C++ where the scope of the new variable <BR>> is imprecisely defined.<BR>> <BR>> On Feb 11, 2008, at 4:29 AM, Jay wrote:<BR>> <BR>> > Does anyone else find it bothersome that you can't introduce VARs <BR>> > anywhere? Kind of like in C++?<BR>> > Ok, or if you grant that frame size doesn't matter THAT much, and <BR>> > the compiler might do stack packing anyway, you can move all your <BR>> > locals up top like typical C, but still, how about for the module <BR>> > initializer?<BR>> > Still it seems good to me to do manual stack packing since it is <BR>> > often so easy..<BR>> > WITH helps, but only for "relative constants".<BR>> ><BR>> > It would be nice if the code below could have still loops until t0 ! <BR>> > = t1, but the repeat condition is outside the scope in which t1 is <BR>> > available. This feels quite lame..<BR>> ><BR>> > - Jay<BR>> ><BR>> ><BR>> ><BR>> > > Date: Mon, 11 Feb 2008 10:24:00 +0000<BR>> > > To: m3commit@elegosoft.com<BR>> > > From: jkrell@elego.de<BR>> > > Subject: [M3commit] CVS Update: cm3<BR>> > ><BR>> > > CVSROOT: /usr/cvs<BR>> > > Changes by: jkrell@birch. 08/02/11 10:24:00<BR>> > ><BR>> > > Modified files:<BR>> > > cm3/m3-libs/m3core/src/time/WIN32/: Time.m3<BR>> > ><BR>> > > Log message:<BR>> > > no need for globals here..<BR>> > ><BR>> ><BR>> ><BR>> > Helping your favorite cause is as easy as instant messaging. You <BR>> > IM, we give. Learn more.<BR>> <BR><BR><br /><hr />Connect and share in new ways with Windows Live. <a href='http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_012008' target='_new'>Get it now!</a></body>
</html>