🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #769

Re: Time and Date in Quintus P.

#769
From: David I Schwartz
Date: Thu, 03 Sep 1992 23:04
28 lines
1627 bytes
In article <1992Sep3.201023.6191@tom.rz.uni-passau.de>, baier@forwiss.uni-passau.de (Joern Baier) writes...
>Hi!
> 
>For an application I need the time and date in Quintus Prolog. I wrote a
>small predicate date/1 but I'm not content with it, because I have to
>create an extra file. How can I get a random number in PROLOG to create
>unique file names?
>The main problem is that 'unix(system(date))' sends its output directly
>to the user, regardless of the current output.
> 
>I enclose the protocol of a session below.
> 
>Thanx in advance,
>			Joern
>-------------------------------Cut here!------------------------------
>gandalf:~/prolog/dp 103> prolog
> 
>Quintus Prolog Release 2.5.1 (DECstation 3100, Ultrix 3.1)
>| ?-  tell(test_2),current_output(O),unix(system(date)),told.
>Thu Sep  3 22:01:06 MET DST 1992
> 

Check out your library files. In version 3.1.1, there are predicates for 
dates (date.pl) and random number generators (random.pl). I think these
may be in your directory already. You'll have to look in these library
files to see which predicates you'll need.

Dave
Technical Details
Message-ID: <Bu0yr6.LAC@acsu.buffalo.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!psuvax1!rutgers!ub!acsu.buffalo.edu!ubvmsd.cc.buffalo.edu!v104n55k
References: <1992Sep3.201023.6191@tom.rz.uni-passau.de>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!gatech!psuvax1!rutgers!ub!acsu.buffalo.edu!ubvmsd.cc.buffalo.edu!v104n55k
From: v104n55k@ubvmsd.cc.buffalo.edu (David I Schwartz)
Newsgroups: comp.lang.prolog
Subject: Re: Time and Date in Quintus P.
Message-ID: <Bu0yr6.LAC@acsu.buffalo.edu>
Date: 3 Sep 92 23:04:00 GMT
References: <1992Sep3.201023.6191@tom.rz.uni-passau.de>
Sender: nntp@acsu.buffalo.edu
Organization: University at Buffalo
Lines: 28
News-Software: VAX/VMS VNEWS 1.41
Nntp-Posting-Host: ubvmsd.cc.buffalo.edu