Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Dec Pascal
@ 1995-11-10  5:00 Shane L. Kingry
  1995-11-16  5:00 ` John R. Reagan
  0 siblings, 1 reply; 2+ messages in thread
From: Shane L. Kingry @ 1995-11-10  5:00 UTC (permalink / raw)


One of the classes in the department is having its students write a
Pascal program.  In this program, they need the 'clock' function, or
something of the like.  A sample bit of code would be:

VAR
  Seed: integer;
.
.
.
  Seed := clock;


This compiles fine, but fails miserably when trying to link:

ld:
Unresolved:
pas$clock2
Pascal: Severe: Failed while trying to link.


When we installed Pascal, all the test programs seemed to work compile
and link fine.

I looked on the Layered Products CD for help, and it did mention that
not all of the functions that the different DEC Pascal compilers had
were compatible with all of their different OS's and systems, but it
said nothing about clock not working on an OSF3.2 system.  Mind you,
the date of this CD was Feb 93 (which bring upon another question...
where and for how much could I get a new one?).

I guess my question is: Is something installed incorrectly, are they
compiling without the proper flags, or is this just not a valid
function with this version of Pascal?

Thanks!

Shane
shane@saturn.uaamath.alaska.edu
System Admin.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Dec Pascal
  1995-11-10  5:00 Dec Pascal Shane L. Kingry
@ 1995-11-16  5:00 ` John R. Reagan
  0 siblings, 0 replies; 2+ messages in thread
From: John R. Reagan @ 1995-11-16  5:00 UTC (permalink / raw)



In article <480jfl$os4@news.alaska.edu>, shane@saturn.uaamath.alaska.edu (Shane L. Kingry) writes...
>One of the classes in the department is having its students write a
>Pascal program.  In this program, they need the 'clock' function
> 
>This compiles fine, but fails miserably when trying to link:
> 
>ld:
>Unresolved:
>pas$clock2
>Pascal: Severe: Failed while trying to link.

Unfortunately, there was a regression in the Pascal RTL (its in the
DPORTLxxx subset) such that the pas$clock2 RTL routine was accidently
left out. (We changed our build around and forgot a -D on a 'cc' command...)

Here's the source for pas$clock2 and pas$sysclock2 (the 2 routines missing 
from DPORTL540)

#include <sys/resource.h>
long pas$clock2( void )
{

struct rusage r;

    getrusage(RUSAGE_SELF,&r);
    return ( (r.ru_utime.tv_sec*1000) + (r.ru_utime.tv_usec/1000) );

}

long pas$sysclock2( void )
{

struct rusage r;

    getrusage(RUSAGE_SELF,&r);
    return ( (r.ru_stime.tv_sec*1000) + (r.ru_stime.tv_usec/1000) );

}

Alternatively, you can go back an install an older DPORTLxxx subset.
There should be a DPORTL522 on the V3.2 CDROM itself (its near the '/'
directory, you'll have to look for it...)  You'll loose any other
bug fixes and new features (like support for QUADRUPLE) added to
DPORTL540 however...

A corrected DPORTLxxx will be included in the next release of Digital
UNIX as well as in the next compiler kit.  I'm planning on making a
'ECO' kit that should also be available from the support center as well
as Digital's ftp service (if I can figure out just how to do that).

---
John Reagan
DEC Pascal Project Leader
Application Compilers and Environments
Digital Equipment Corporation
reagan@hiyall.enet.dec.com
Disclaimer:  The opinions and statements expressed by me are not
             necessarily those of Digital Equipment Corporation.
---



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1995-11-16  5:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-11-10  5:00 Dec Pascal Shane L. Kingry
1995-11-16  5:00 ` John R. Reagan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox