Dates and Time in the Delila System

The main problem with compiling Delila programs is that obtaining the date and time from the system is not standard in Pascal. Since many Delila programs stamp their output with a Date/Time, the relevant routines must be set to work on your computer. To make this easy, I have packaged the routine that calls date and time functions into a procedure called getdatetime. I then modified this procedure to work on several different comilers. The ones I have built so far are:

If you can get any one of these programs to work on a compiler (give you the correct date) then virtually all other Delila programs will also work on that compiler.

These programs contain standard routines for manipulating date and time information. This information is used to stamp files to avoid confusion with printouts. These routines are the only non-standard Pascal calls in the Delila system. The routines are:

The package of time routines can be automatically transferred into Delila programs using the module program. The module program provides a system independent insertion mechanism. Module is pure standard Pascal and should compile on all compilers.

How To Use the Module Program
Pascal programs do not have a standard way to interact with system file names. For simplicity, in the Delila system, we use standard names for the input and output of programs such as Module. Suppose we are converting the source code for delmod.p to GPC using timegpc.p Then briefly,

  1. Get a copy of the module and compile it. It is 100% pure Pascal and should compile on any reasonable Pascal compiler. I recommend the GPC compiler. Be sure to use the gpcc script.
  2. Copy the source code (input) into a file named "sin".
    cp delmod.p sin
    (where cp is the unix copy program).
  3. Then select the time module library from above and put it in a file named "modlib".
    cp timegpc.p modlib
  4. Make sure that there is an empty "modcat" file. Under unix you can do this with:
    echo -n "" > modcat
    Note that this wipes out the previous contents of modcat. You may reuse modcat only if you do not modify the modlib.
  5. Run the module program.
    module
    The result will be in "sout" and a list of the modules transferred will be in the "list" file.
  6. If you have a backup somewhere, then you can safely put the results back:
    cp sout delmod.p
    The result is that the time modules in timegpc.p are now substituted into delmod.p.
See the module program for more details. I have found this to be an extremely reliable mechanism, and it works on all systems.

Delmod Program
The delmod.p program is the place that I keep the current working modules. From there the time modules are transferred into various programs.

color bar Small icon for Theory of Molecular Machines: physics,
chemistry, biology, molecular biology, evolutionary theory,
genetic engineering, sequence logos, information theory,
electrical engineering, thermodynamics, statistical
mechanics, hypersphere packing, gumball machines, Maxwell's
Daemon, limits of computers


Schneider Lab

origin:    2000 Jul 24
updated: 2011 Aug 11

color bar