Results 1 to 3 of 3

Thread: about g05caf subprogram

  1. #1
    Join Date
    Dec 2012
    Beans
    2

    about g05caf subprogram

    Hello every one! I'm a new FORTRAN programmer and I 've gotten a confusion about some NAG library subprogram,the subprogram g05caf. I know that it is used to generate random numbers uniformly distributed in the range [0.0,1.0] and can be initialized by one of these two subroutines g05cbf or g05ccf.
    Now what I'm confused about is that is this subprogram (g05caf) a function or subroutine because the text book that I'm reading name it a routine but deal with it as a function not subroutine (declared as a function). So if some one can explain this matter?
    Note: you may like to have a look for my program, please open this link and refer to page number 48:
    http://mgg.coas.oregonstate.edu/~and...8fortran90.pdf
    Best regards
    gallo

  2. #2
    Join Date
    Dec 2012
    Beans
    2

    Re: about g05caf subprogram

    Are there any one can help this, please?

  3. #3
    Join Date
    Jul 2009
    Location
    Austin, Texas, USA
    Beans
    405

    Re: about g05caf subprogram

    Quote Originally Posted by mgallom View Post
    . . . . Now what I'm confused about is that is this subprogram (g05caf) a function or subroutine because the text book that I'm reading name it a routine but deal with it as a function not subroutine (declared as a function). So if some one can explain this matter? . . . .
    Whether a particular group of lines of code should be considered a function or a subroutine is actually rather arbitrary.

    What makes the distinction is how you use that group of lines of code in your overall program: e.g., whether you declare it as a function or call it as a routine.
    Last edited by rewyllys; January 5th, 2013 at 11:55 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •