/* This program gets the time and date and returns */ /* it to a calling fortran program */ /* */ #include void cprogtime_(timedat,nch) char *timedat; /* char *ctime(Clock); */ int nch; { time_t Clock; /* This sets character Clock to be a long integer. By not having * in front of Clock it means it refers to the value itself rather than a pointer to where the value of Clock would be. */ Clock=time(0); /* Puts time since Jan 1970 into the Clock variable */ strcpy(timedat,ctime(&Clock)); /* The & in front of Clock says to look for the value of CLock w/ ctime rather than the address where it will be */ return; }