<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>The one I got from m3devel had most newlines removed such as to be hard to read, AND got /slightly/ truncated (just the signature).<BR>
Let's try this.<BR>
<BR>
I will change the global to datetime() shortly.<BR>
I was thinking of GetDateTimeStamp() but others probably don't like my verbosity and it is not consistent with the terse lowercasing "Romans".<BR>
<BR>
- Jay<BR><BR>
<BLOCKQUOTE>
<HR id=EC_stopSpelling>
From: jayk123@hotmail.com<BR>To: m3devel@elegosoft.com<BR>CC: wagner@elegosoft.com<BR>Subject: time/date/version functions in Quake?<BR>Date: Tue, 1 Jan 2008 20:17:51 +0000<BR><BR>
<META content="Microsoft SafeHTML" name=Generator>
<STYLE>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass EC_body.hmmessage
{font-size:10pt;font-family:Tahoma;}
</STYLE>
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></BLOCKQUOTE><br /><hr />The best games are on Xbox 360. Click here for a special offer on an Xbox 360 Console. <a href='http://www.xbox.com/en-US/hardware/wheretobuy/' target='_new'>Get it now!</a></body>
</html>