Open Watcom Fortran: ETIME, FDATE, FLUSH, GETENV

Hi,

I need to call the following routines in my OW Fortran programs and I
understand that the way to handle it under windows (since it is not
implemented in OW) is to use c wrappers.

The problem is that I am not really a specialist of c wrappers. Has
anyone already implemented these? 

Thanks in advance 

Victor

0
12/16/2005 2:00:39 PM
comp.lang.fortran 11340 articles. 37 followers. Post Follow

3 Replies
348 Views

Similar Articles

[PageSpeed] 20
victor wrote:

>Hi,
>
>I need to call the following routines in my OW Fortran programs and I
>understand that the way to handle it under windows (since it is not
>implemented in OW) is to use c wrappers.
>
>The problem is that I am not really a specialist of c wrappers. Has
>anyone already implemented these? 
>
>Thanks in advance 
>
>Victor
>
>  
>
The online Fortran 77 users guide is a good place to start. Try to look 
for the following  -   gettim, getdat, flushunit, fgetenv 



0
jdoe4201 (18)
12/16/2005 2:31:22 PM
Thank you John.

It is indeed there on page 92.
http://openwatcom.mirrors.pair.com/11.0c/docs/f77userguide.pdf

And it works on my platform (Windows)

0
12/16/2005 3:10:45 PM
victor wrote:

>Thank you John.
>
>It is indeed there on page 92.
>http://openwatcom.mirrors.pair.com/11.0c/docs/f77userguide.pdf
>
>And it works on my platform (Windows)
>
>  
>
It  is not hard to duplicate "etime" using "gettim".  The "fdate" thing 
using "getdat" may be trickier, especially  if you need to get day of 
week.  It might turn out easier to use a function written in C, 
shamelessly plagiarized from the internet.

/*   fdate.c */
#include<time.h>
int fdate(utime)
char utime[24];
{
        int i;
        time_t t;
        t=time (NULL);
        for (i=0; i<24; i++) utime[i]= *(ctime(&t)+i);
        return 1;
}

Called from fortran like this -

c test1.for
*$pragma aux fdate "!_" parm (value)
       character*30 string
       external fdate
       integer fdate
       i=fdate(string)
       print *,string
       pause
       end
    

0
jdoe4201 (18)
12/16/2005 11:31:27 PM
Reply:
Similar Artilces:

open stdin a second time
Hi, I´m opening stdin to get a file and pass it through a pipe. r=popen("/usr/local/bin/mfilt","w"); while((ret=fread(l,1,sizeof(l),stdin))>0){ fwrite(l,1,sizeof(l),r) } pclose(r); After that, if mfilt returns me an error I want to send an email with the original message attached...but how can I re-read stdin to do that. I do not want to save the message to a temp file or save it to memory for i/o questions. Is there a way to re-read stdin ? amit khan <nospam@nospam.com> writes: > I´m opening stdin to get a file and pass it thro...

Open Forum 4 ALL #2
Opened Forum ! http://sqlwarrior.freehostia.com/forum SQL Warrior Forum The most opened forum on the world ! Every one can join and asks question, expert will reply ! Discussion about SQL, Dotnet and VB... Job seeker and company requirement : Found best workers here and posts your jobs here for free. Workers can posts resume and search for jobs ! Advertise here for free! (in the misc forum) Posts anything you want to know. Show your site and get higher traffic Join now it's free http://sqlwarrior.freehostia.com/forum http://sqlwarrior.freehostia.com/forum ...

Open Debate About OpenDocument
http://www.foxnews.com/story/0,2933,172063,00.html James Prendergast's column, Massachusetts Should Close Down Open Document, touched a nerve among FOXnews.com's tech savvy readers and ignited a heated response. ... Editor's Note: The column "Massachusetts Should Close Down OpenDocument" that appeared on FOXnews.com Sept. 28 identified author James Prendergast as executive director of Americans for Technology Leadership, but failed to disclose that Microsoft is a founding member of that organization. ATL is a coalition of t...

how to insert or delete element to a list in fortran 90
Hi, I have this question, how can I do to add a record or to delete a record from a list or array n fortran 90?? That is, let suppose that I have the following array: (1 4 3 9 10 2 15 8) And I want to add the value 13 in the 4th position in order to obtain: (1 4 3 13 9 10 2 15 8) By the way this is not homework, I just want to find a better way to handle the data structure of the software I'm coding. That's I have I huge array that represent x and y point of n vertex, and I want to add to this array m vertex, but I don't want to add this vertex and the end of the array but ...

Macro for opening files by passing filenames as token
Hello Folks I was trying to write a macro to open files by passing the file names as a token and I tried the following syntax but it didn't work. Define fsdts1 (!POS !CHAREND ('/')). !DO !fsds !IN (!1). GET FILE=CONCAT("'D:\temp\",!fsds,".sav'".) !DOEND. !ENDDEFINE. *** fsdts1 "fname"/. can any one help me on this ? Thanks in Advance -Anantha Try this Define fsdts1 (!POS !CHAREND ('/')). !DO !fsds !IN (!1). get fil !Quote(!concat('D:\temp\', !fsds, '.sav')). !DOEND. !ENDDEFINE. A...

Tried Open Office. Hate it.
Using Office 2003. Love it. On Aug 16, 9:05=A0pm, reporter <TruckSaf...@gmail.com> wrote: > Using Office 2003. =A0Love it. to each his own.... we love you for trying it. "reporter" <TruckSafety@gmail.com> stated in post c6aff9c3-eee2-4d48-af8f-edbf8fbfb154@v26g2000prm.googlegroups.com on 8/16/08 6:05 PM: > Using Office 2003. Love it. Curious what about Open Office was not to your liking? The current version is excellent but, of course, it has its pros and cons like anything. -- "Innovation is not about saying yes to everything. It's about saying...

Open panel too long to open....
OS 10.3.4 on a G4 Cube w Internet connection open (cable) When using a context menu 'Open with..' on a file in the Finder... it takes a long long time to display the Open Panel (spinning wheel)... is it searching a complete list of libraries to display including out searching on internet ?...... why it's so long ? any way to shorten this delay ? thanks for hints Joss ...

Open Intervals Represented by Gauges
I would like to represent an open interval (on the real line) with a Horizontal or VerticalGauge. Let's say (0, 1). I can represent this in calculations by using ConditionalExpression[x, 0 < x < 1] where x might be set by a HorizontalGauge. Then the ConditionalExpression of x becomes Undefined at the endpoints. But I would also like this to be reflected in the appearance of the Gauge. For interior points I would like the Gauge marker to be a blue triangle, and at the endpoints to change to a white triangle with a black outline. The following was my attempt us...

Proxy site open all blocked sites 7811
Proxy site open all blocked sites http://yourp.zxq.net ...

Opening multiple m files
I currently use the R2007a version of MATLAB. However, the previous version you could open multiple mfiles in one window but different tabs. However, this version, whenever you try to open another mfile while one is already opened, it will make the currently opened one invisible and there is no way you can get to it. This is frustrating "ade77 " <ade100a@gmail.com> wrote in message <gc9d0d$hjn$1@fred.mathworks.com>... > I currently use the R2007a version of MATLAB. However, the previous version you could open multiple mfiles in one window but different tabs. > ...

Free open source IDE for C programming
Hi, I would like to know what do u suggest for Free open source IDE for C programming. The minimum features i expect are online help (in the editor) something u see in Borland C compiler (with that Ctrl+F1 option), highlighting, auto indenting. Dev C++ does the last two but i don't seem to have online help i expect. Thanks in advance. Greenhorn. On 8 Feb 2005 12:47:14 -0800, "Greenhorn" <teachgreenhorn@yahoo.com> wrote: >Hi, > I would like to know what do u suggest for Free open source IDE for >C programming. The minimum features i exp...

Failure to add object in kepserver (Open Process Control app)
Hi everyone, I am asking you this question because I'm pretty much stuck. I am a student and my assignment is to make a simple OPC client/server application. To this end I've gotten Vihang Patil's OPC simulation program from here: http://www.mathworks.com/matlabcentral/fileexchange/27788-opc-serverclient-demo However, when I run it, without modifications, I get a "non-existent field" error and a "ui callback" error upon pressing the two buttons of the GUI, for a cylinder and ejector device, respectively. Kepserver, the app used for the OPC server part of...

Problems with Using OPEN in Fortran MEX
OS - Win 7 Ultimate - 64 bit MATLAB - 2010a - 64 bit Fortran - Intel Visual Fortran 11.1 I have a DOS Fortran program that uses lookup tables contained in binary files on the local hard drive read in using "OPEN". The lookup tables are static and do not change from run to run. The program works fine. I wrote a wrapper for the program, had a few issues that I eventually worked out, but now the mexFunction wrapper is working. (I checked with "mexPrintf", and the inputs argument passed from MatLab are all correct) However, deep in the program, it bombs when I call the "...

How do I open this
Can anybody tell me what program I can use to open this I tried gsview, distiller, rope, and a bunch of other small programs. they all give me errors. I have windows but can get to a mac, but dont know were to get pagemaker at least a version that will open this file. So does anybody know a program that will more than likely open it. all programs usually give me to errors missing font times-roman, and an error saying that the file is corrupt or terminates early. please help. here is what the first part of the file says %!PS-Adobe-2.0 %%Title: chap6.sltn.new %%Creator: PageMaker 4.21 %%Creat...

Cannot open MS Word from within our VO app
Hi all, the OrtoWin software we develop, contains a few connections via OLE to open MS Word and MS Outlook, etc. One of our customers isn't capable of opening MS Word from within our OrtoWin application. We added a few messageboxes into the app, in order to find the exact location of the fault in the code. The problem seems to be in the call procedure of the OLE object. When we check if the object is NIL, the answer is no, so we have an object. When we continue and check if the fInit is succeeded, the returnvalue is false, so the fInit had failed. We have reasons...

FCC Adopts First Open Internet Regulations [telecom]
Party Line Vote Exposes Deep Divisions; Two Republican Commissioners Are Harshly Critical by John Eggerton -- Multichannel News, 12/21/2010 | The Federal Communications Commission voted along strict | party lines Tuesday to adopt regulations on Internet | access. | | The meeting was characterized by cordial delivery of | scathing dissents by the Republicans and a less-than | enthusiastic concurrence by swing vote Democratic | commissioner Michael Copps, who said he had seriously | considered dissenting before concluding it was at least | a first step in the right direction. Repu...

Cannot open excel through weblogic/tomcat server
I'm not able to open an excel file through weblogic/tomcat server.why?It opens as an excrypted file.Can someone help to figure out a solution?? On 14 Aug, 05:56, ruds <rudra...@gmail.com> wrote:> I'm not able to open an excel file through weblogic/tomcat server.> why?> It opens as an excrypted file.> Can someone help to figure out a solution??http://www.mrc-productivity.com/members/manual/servletmanual/using_tomcat_to_serve_excel_files.htmlGenerally it is useful to search Google BEFORE posting the question,the above was the 1st result of google search for 'tomcat ...

opener.opener ?
Hi, I have window A, which open popup A which Open popup C. In the two popups I use a common JavaScript file and in order to distinguish between them I use the following code: if (typeof(opener.opener)=="object") { alert("1"); } else if (typeof(opener)=="object") { alert("2"); } The problem is that I get "1" for both popups. I.e. "opener.opener" exists also for popup A. Any ideas ? Thanks, Yaron Yaron C. wrote: > I have window A, which open popup A which Open popup C. > > In the two popups I use a common...

[News] Google Unveils Source Code Search, Fuelled by Free Open Source Software
Google crawls into source-code search ,----[ Quote ] | The company on Thursday launched a Web site, Google Code Search, which | the company says will let programmers search billions of lines of code | for tips on how to write their own software. `---- http://news.zdnet.com/2100-3513_22-6122819.html This clearly puts Open Source programmers at position of greater advantage. Imagine being able to see an example of the use of a function within seconds, as well as find reusable components. Dot net programmers may have a harder time... Roy Schestowitz wrote: > Google crawls into source-code...

APL job opening
Hi, We are looking for a senior APL developer (five plus years of solid experience) to do maintenance and support work. The position is located in Markham Ontario -- this is a full-time opening (sorry, no telecommuting). If you are interested, please contact me at ayyad(dot)alam(at)cgi.com. Thanks, Ayyad ...

PyCon 2008 Registration Open!
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigA6E729CE33A7FBEF8EB4851C Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable I am pleased to announce that PyCon 2008 registration is now open! http://us.pycon.org/2008/registration/ Early-bird registration is open until February 20, so there's one month to register at the low rates. Regular on-line registration will be available from February 21 through March 7. PyCon 2008 will be held from March 13 through 20 in Chicago: * Tutorials: T...

[News] iPods Opened up with Linux, Facebook Opened up with Open Source Software
iPod Inside: Standard features of Apple MP3 players ,----[ Quote ] | iPod-Linux is free software that provides users with more than just another | way to fill up the database: for friends of mobile gaming, for example, there | is a Gameboy emulator called iBoy. The standard user interface for Linux is | available in a palmtop format called podzilla. Users can then install things | like music players, pocket calculators, calendar, file browser, picture | viewer, painting, recording, text and video programs, as well as numerous | games. `---- http://www.bangkokpost.com/gadget/gadge...

open : I/O Error
I am trying to get an ADIC changer with Sony DAT drive working on Unixware 7.1 via an Adaptec aha-2940uw. The system finds the changer and drive OK and identifies them correctly, but when I run asetup for ArcservIT, and sell it to take controll of the devices I get "open : I/O error" twice. When I run mccntl -i the changer initialises OK, then I can put a tape in the drive with mccntl -l 1, and it all shows OK with mccntl -s, but I can't eject the tape with either mccntl -e 1 or mccntl -E. It returns the error "MC_MOVE_MEDIUM failed". Seems to me I'm so close to...

Open Perl IDE not compiling
I installed the Open Perl IDE two weeks ago to run some perl scripts. This week, the compile button doesn't work ... any help? Cheers - Eugene eugenedalt@yahoo.com wrote: > I installed the Open Perl IDE two weeks ago to run some perl scripts. > This week, the compile button doesn't work ... any help? Cheers - Whatever you changed, change it back. ...

submit opener form after submitting pop-up form
Hi, I want to use the submit button of a new window to submit the form of the new window (which carries two values to the opener window) and then submit the opener form. Can anyone tell me how to do this? Marco Alting wrote: > I want to use the submit button of a new window to submit the form of the > new window (which carries two values to the opener window) and then submit > the opener form. > > Can anyone tell me how to do this? In the document of the new window: <form ... onsubmit="window.setTimeout('opener.document.forms[...].submit()', 42); retu...