<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'> Hi. This is per Olaf.  <BR>
<BR>  Quake code in   <BR>    m3-sys\cm3\src\version.quake   <BR>
<BR>  wants/needs the time/date like so:  <BR>
<BR>  C:\dev2\cm3.2\m3-sys\m3quake>\cm3\bin\cm3.exe -version  <BR>  Critical Mass Modula-3 version d5.5.1  <BR>    last updated: 2007-12-30  <BR>    compiled: 2008-01-01 19:59:32    <===  <BR>    configuration: \cm3\bin\cm3.cfg  <BR>
<BR>In UTC (universal coordinated time, also known as "greenwich mean time (GMT)")<BR>Currently this is via an application specific global variable in m3quake called "CM3_VERSION_NOW".<BR>"Currently", as in, I just did it, it is committed. (I'm impatient and impulsive and love coding, take me or leave me...)<BR>
<BR> C:\dev2\cm3.2\m3-sys\m3quake>findstr /s NOW  *<BR> src\QMachine.m3:            "CM3_VERSION_NOW", <BR>
<BR>It's only used on Windows, because I haven't yet tested elsewhere.<BR>
<BR>Olaf wants to consider something more general, as I understand.<BR>Some little extra feature in Quake, new built in function(s)/variable(s) (probably function(s)).<BR>Maybe something like Unix date (er, probably less general than that)<BR>or strftime, or something.<BR>
<BR>I'm skeptical that resolution to the second is useful here, seems overly precise.<BR>
<BR>Please discuss/decide/spec. :)<BR>(I don't care much. I'd be content just to change the variable to a function and decide on a name that isn't ALL CAPS,<BR>
though those were my own doing in the first place, as well as learning the best idiom for those few lines of code,<BR>
such as hopefully to avoid the six+ extra heap allocs for the TEXTs before concating them, like something involving<BR>
a small fixed sized buffer on the stack maybe? :) ) (Not clear how much "safety" a "competent programmer"<BR>
needs and if it is all worth it...obviously has its place, but...)<BR>
<BR>Oh, and to be a bit obnoxious -- maybe the higher level version.quake should be pushed into Modula-3 code????<BR>I mean..something like..some stamp that is applied to all binaries?<BR>
You know, like on Windows, there are these nice version resources.<BR>Putting them in every file automatically would be nice, unless overridden by the use -- typical override would<BR>be provision of all Win32 resources, and hopefully that'd include a version resource.<BR>
 <BR>
I /know/ I am confusing issues -- universal injection of such data, vs. implementation in Quake vs. Modula-3.<BR><BR>Any conventions/mechanisms for other platforms?<BR>The Mac has/had version resources, but these days that'd probably involve creating 10 more files and directories per executable.<BR>I can research it though easily enough..<BR>
<BR>On Windows it would be an extra dependency, on a resource compiler, but they are ubuiquitous.<BR>They come with all commercial toolsets and many free ones.<BR>
<BR> - Jay<BR><br /><hr />Don't get caught with egg on your face. Play Chicktionary! <a href='http://club.live.com/chicktionary.aspx?icid=chick_wlhmtextlink1_dec' target='_new'>Check it out!</a></body>
</html>