School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,143 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,754 people online right now. Registration is fast and FREE... Join Now!




FORTRAN - ENTRY sentence. How to understand it?

 

FORTRAN - ENTRY sentence. How to understand it?

henryl

12 Oct, 2009 - 06:20 AM
Post #1

New D.I.C Head
*

Joined: 12 May, 2006
Posts: 24



Thanked: 2 times
My Contributions
Hi

I'm translating a old FORTRAN 77 program to MATLAB R2007. Everything was ok, until it appeared the following statement:


CODE

1  SUBROUTINE gday(idd,imm,iyear,kd)
.
.
.
20 ENTRY dmy(idd,imm,iyear,kd)
21
22 !  GIVEN THE (GREGORIAN) DAY#, KD, AS CALCULATED ABOVE IN THIS ROUTINE,
23 !  ENTRY DMY RETURNS THE (GREGORIAN) DAY, MONTH, YEAR AND CENTURY.
24
25 !  TEST FOR VALID INPUT:
26 IF(kd <= 0) WRITE(lp,5040)kd
27 5040  FORMAT(' KD = ',i7,'  INVALID INPUT. DMY STOP.')
28 !
29 !  SAVE KD
30 kkd=kd
.
.
.


In the main program there is a calling to dmy subroutine, but obviously MATLAB doesn't find the subroutine/function dmy. My questions are:

1. Can i cut the code from line 20 to the end, paste it in a new file, and save like a separate subroutine?
2. Is there any dependence between variables previouslly declared from lines 1 to 19 and variables before line 20?
3. If answer to question 1 is no, What should i do?

Thanks!

This post has been edited by henryl: 12 Oct, 2009 - 06:21 AM

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 03:34PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month