<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" xmlns:Repl="http://schemas.microsoft.com/repl/" xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda="http://www.passport.com/NameSpace.xsd" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss="http://schemas.microsoft.com/office/2006/digsig-setup" xmlns:dssi="http://schemas.microsoft.com/office/2006/digsig" xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:spwp="http://microsoft.com/sharepoint/webpartpages" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:pptsl="http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" xmlns:spsl="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService" xmlns:Z="urn:schemas-microsoft-com:" xmlns:st="" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"MS PGothic";
        panose-1:2 11 6 0 7 2 5 8 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Gill Sans";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:GillSans-Light;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"\@MS PGothic";
        panose-1:2 11 6 0 7 2 5 8 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"MS PGothic","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"MS PGothic","sans-serif";}
span.ecxapple-style-span
        {mso-style-name:ecxapple-style-span;}
span.ecxapple-converted-space
        {mso-style-name:ecxapple-converted-space;}
span.ecxapple-st
        {mso-style-name:ecxapple-st;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="Section1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">Jay:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">I’m still catching up after being in hospital, but noticed you are working on the Date.i3/m3 interface and module.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">There is a problem that I’d like to post on the newsgroup that may be related. 
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">I’m not sure if the problem is due to the way Date.i3/m3 is coded, or perhaps a problem in the network objects stub generator, but I thought whilst you are
 looking at Date.i3/m3 something might trigger in your mind about how to fix the problem.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">I have several interfaces that export a Network Object.  Of course, these get processed by the network objects stub generator at compile time.  For some of
 these, the generated files fail to compile due to Date.i3 not being listed in the IMPORT list. 
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">Since these offending modules are generated at compile time, it’s not a programming error in the new source package that is being compiled.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">The way I work around the problem is by editing the generated files after the compile fails.  Namely, I go to the target folder (in this case NT386) and edit
 the generated m3 files by adding “IMPORT Date;”, then recompile and all is well.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">Of course, the next time you erase the target folder, change the underlying interface, or run “cm3 –clean”, the generated file has to be created again and
 you have to go thru the compile-edit-compile cycle again to repair the problem.  If you are delivering source code to a customer, you then have to document the work-around for them so that they can get the package to compile.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">I reported this problem years ago, but that was back before we were tracking bugs using the new system.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">It could be that the way Date.i3/m3 is coded is causing the stub generator not to think it needs to import it, or it could be that the stub generator isn’t
 doing its job right in the first place.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">Now after saying all this, I know I should provide a concrete example.  I’ll have to go back and see if I ever reduced the code to a smaller set that demonstrates
 the problem.  Otherwise, I can’t give anyone the full source code because it was a “work-for-hire” and I don’t have the right to publish these sources.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">Let me know if you want a concrete example and I’ll see what I can do.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">Randy<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-left:.5in"><b><span style="font-size:10.0pt;
font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;
font-family:"Tahoma","sans-serif""> jayk123@hotmail.com [mailto:jayk123@hotmail.com]
<b>On Behalf Of </b>Jay K<br>
<b>Sent:</b> Thursday, April 15, 2010 5:26 PM<br>
<b>To:</b> Tony<br>
<b>Cc:</b> m3devel<br>
<b>Subject:</b> Re: [M3devel] Modula-3/C interop in Date/Time?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;
font-family:"Verdana","sans-serif"">Oops, right, of course. Important to get the things right I know to keep the question clear/narrow.<br>
 <br>
 - Jay<br>
<br>
 <o:p></o:p></span></p>
<div class="MsoNormal" align="center" style="margin-left:.5in;text-align:center">
<span style="font-size:10.0pt;font-family:"Verdana","sans-serif"">
<hr size="2" width="100%" align="center" id="stopSpelling">
</span></div>
<p class="MsoNormal" style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:
12.0pt;margin-left:.5in">
<span style="font-size:10.0pt;font-family:"Verdana","sans-serif"">From: hosking@cs.purdue.edu<br>
Date: Thu, 15 Apr 2010 12:55:52 -0400<br>
To: jay.krell@cornell.edu<br>
CC: m3devel@elegosoft.com<br>
Subject: Re: [M3devel] Modula-3/C interop in Date/Time?<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;
font-family:"Verdana","sans-serif"">Excepting that INTEGER is not the same as int on 64-bit platforms.<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;
font-family:"Verdana","sans-serif""><o:p> </o:p></span></p>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span class="ecxapple-style-span"><span style="font-size:9.0pt;font-family:"Gill Sans","serif";color:blue">Antony Hosking</span></span><span class="ecxapple-converted-space"><span style="font-size:9.0pt;font-family:"Gill Sans","serif";color:black"> </span></span><span class="ecxapple-style-span"><span style="font-size:9.0pt;font-family:"Gill Sans","serif";
color:black">|</span></span><span class="ecxapple-converted-space"><span style="font-size:9.0pt;font-family:"Gill Sans","serif";color:black"> </span></span><span class="ecxapple-style-span"><span style="font-size:9.0pt;font-family:"Gill Sans","serif";
color:black">Associate
 Professor | Computer Science | Purdue University</span></span><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span class="ecxapple-style-span"><span style="font-size:9.0pt;font-family:"GillSans-Light","serif";color:black">305 N. University Street | West Lafayette | IN 47907 | USA</span></span><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span class="ecxapple-style-span"><span style="font-size:9.0pt;font-family:"Gill Sans","serif";color:blue">Office</span></span><span class="ecxapple-style-span"><span style="font-size:9.0pt;font-family:"GillSans-Light","serif";
color:black"> +1
 765 494 6001 |</span></span><span class="ecxapple-converted-space"><span style="font-size:9.0pt;font-family:"GillSans-Light","serif";
color:black"> </span></span><span class="ecxapple-style-span"><span style="font-size:9.0pt;font-family:"Gill Sans","serif";color:blue">Mobile</span></span><span class="ecxapple-converted-space"><span style="font-size:9.0pt;font-family:"GillSans-Light","serif";
color:black"> </span></span><span class="ecxapple-st"><span style="font-size:9.0pt;font-family:"GillSans-Light","serif";color:black">+1
 765 427 5484</span></span><span style="font-size:9.0pt;font-family:"Helvetica","sans-serif";
color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:9.0pt;
font-family:"Helvetica","sans-serif";color:black"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:9.0pt;
font-family:"Helvetica","sans-serif";color:black"><br>
<br>
<o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;
font-family:"Verdana","sans-serif""><o:p> </o:p></span></p>
</div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;
font-family:"Verdana","sans-serif""><o:p> </o:p></span></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;
font-family:"Verdana","sans-serif"">On 15 Apr 2010, at 02:45, Jay K wrote:<o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;
font-family:"Verdana","sans-serif""><o:p> </o:p></span></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;
font-family:"Verdana","sans-serif"">Is this legal/correct?<br>
 <br>
 <br>
Date.i3:<br>
TYPE TimeZone <: REFANY;<br>
VAR Local, UTC: TimeZone; (* granted, will maybe change these to extern *)<br>
<br>
 <br>
Date.m3:</span><span lang="JA" style="font-size:10.0pt"> </span><span style="font-size:10.0pt;font-family:"Verdana","sans-serif""><br>
REVEAL TimeZone = BRANDED "Date.TimeZone" REF INTEGER;<br>
</span><span lang="JA" style="font-size:10.0pt"> </span><span style="font-size:
10.0pt;font-family:"Verdana","sans-serif""><br>
 <br>
DatePosixC.c:<br>
static const int Local = 0;<br>
static const int UTC = 1;<br>
extern const int const * const Date__Local = &Local;<br>
extern const int const * const Date__UTC = &UTC;<br>
</span><span lang="JA" style="font-size:10.0pt"> </span><span style="font-size:
10.0pt;font-family:"Verdana","sans-serif""><br>
 <br>
- Jay<o:p></o:p></span></p>
</div>
</blockquote>
</div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;
font-family:"Verdana","sans-serif""><o:p> </o:p></span></p>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1">CONFIDENTIALITY NOTICE: This email and any attachments are intended solely for the use of the named recipient(s). This email may contain confidential and/or proprietary information of Scientific Research Corporation.
 If you are not a named recipient, you are prohibited from reviewing, copying, using, disclosing or distributing to others the information in this email and attachments. If you believe you have received this email in error, please notify the sender immediately
 and permanently delete the email, any attachments, and all copies thereof from any drives or storage media and destroy any printouts of the email or attachments.<br>
<br>
EXPORT COMPLIANCE NOTICE: This email and any attachments may contain technical data subject to U.S export restrictions under the International Traffic in Arms Regulations (ITAR) or the Export Administration Regulations (EAR). Export or transfer of this technical
 data and/or related information to any foreign person(s) or entity(ies), either within the U.S. or outside of the U.S., may require advance export authorization by the appropriate U.S. Government agency prior to export or transfer. In addition, technical data
 may not be exported or transferred to certain countries or specified designated nationals identified by U.S. embargo controls without prior export authorization. By accepting this email and any attachments, all recipients confirm that they understand and will
 comply with all applicable ITAR, EAR and embargo compliance requirements.<br>
</font>
</body>
</html>