<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
> If there are "promotion rules" it's just not that obvious. I'm reminded of one<BR>> time when I was missing a prototype in a C program.............. ok that story<BR>> could go on and on.<BR><BR>
You were using a bad compiler or at least bad switches:<BR>
C:\>type t.c<BR>
<BR>void F1()<BR>{<BR> F2();<BR>}<BR>
C:\>cl -c -W4 -WX t.c<BR>Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 80x86<BR>Copyright (C) Microsoft Corporation. All rights reserved.<BR>
t.c<BR>t.c(5) : error C2220: warning treated as error - no 'object' file generated<BR>t.c(5) : warning C4013: 'F2' undefined; assuming extern returning int<BR>
<BR>
and C++ always errors.<BR>
<BR> - Jay<BR><BR> <BR>> To: jay.krell@cornell.edu<BR>> CC: m3devel@elegosoft.com<BR>> Subject: Re: [M3devel] another longint variant <BR>> Date: Sat, 9 Jan 2010 16:25:52 -0800<BR>> From: mika@async.async.caltech.edu<BR>> <BR>> Jay K writes:<BR>> >--_953e6126-a89e-4966-8f22-5ccff92e7117_<BR>> >Content-Type: text/plain; charset="iso-8859-1"<BR>> >Content-Transfer-Encoding: quoted-printable<BR>> ><BR>> ><BR>> > > I believe Rodney said something like "mixed operations follow from assig=<BR>> >nability"=3B<BR>> > > and from a language point of view=2C that may be true=2C just not from t=<BR>> >he point of view=3B<BR>> ><BR>> >I meant to say=2C not from the language implementation point of view.<BR>> ><BR>> >Again=2C if I can assign and then add=2C might as well just allow add?<BR>> >Ditto assign and index=2C assign and multiply=2C etc.<BR>> ><BR>> <BR>> The problem is that it's sometimes ambiguous what the result type is.<BR>> <BR>> If you want to get into this kind of mess, why don't you just program in C...<BR>> <BR>> I think this area is probably one of the reasons some people *like* Modula-3.<BR>> We don't want to have to guess what an expression means... it should be obvious.<BR>> If there are "promotion rules" it's just not that obvious. I'm reminded of one<BR>> time when I was missing a prototype in a C program.............. ok that story<BR>> could go on and on.<BR>> <BR>> Mika<BR>> <BR> </body>
</html>