[Simh] Possible TIME and DATE Environment Variable Improvements

Mark Pizzolato - Info Comm Mark at infocomm.com
Wed Jan 8 15:55:49 EST 2014


On Wednesday, January 08, 2014 at 12:10 PM, Christian Gauger-Cosgrove wrote:
> I don't do much simulator scripting, but I have found one slight
> inconvenience with regards to the %DATE% and %TIME% variables.
> 
> I'm trying to setup my simulator command file to attach a text file to the
> simulators LPT that is dated and timed, so I don't accidentally wipe out
> previous LPT listings (or make them grow to very large sizes). As they are at
> present, the %DATE% and %TIME% (and the %CTIME%, but that can be left
> alone) variable are really not suited for direct use as a part of creating a file
> name.
> 
> Would it be possible to reformat the %DATE% variable to be ISO 8601
> compliant? That is, change the forward slashes to hyphens. 

Done.

> Secondly, would it be possible to make the %TIME% variable either return 
> the time without the colons? (ISO 8601 "basic" format, as opposed to the
>  current ISO 8601 "extended" format.)

There now is a %STIME% which returns the time as hh_mm_ss.

> Alternatively, if there is some way to "massage" a the text strings reported
> by %DATE% and %TIME% to be something usable for a filename in the
> simulator command language I would not mind that either.
> 
> 
> As to what I'm trying to do:
> ATTACH LPT listing_%DATE%_%TIME%.txt
> Though, as mentioned previously, the current return strings for %DATE% and
> %TIME% will make -- at least Windows -- complain.
> 
> Thank you,
> Christian

That should work now.  The Windows binaries will be updated in a couple of minutes.

- Mark




More information about the Simh mailing list