Chapter6 - ComputerProgramming usingFortran77...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Computer Programming using Fortran 77 Chapter 6 - Functions
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background Our programs so far have had  Assignment statements I/O Decision statements Loops Files We will use these constructs to build  modular code Why use  modular  programming??? 1. good programming practice 2. ease of maintenance 3. ease of debugging 4. avoid repetition in code
Background image of page 2
Functions: Types 2 Types of functions 1) library (system supplied) 2) programmer defined we have used some  library  functions supplied by  Fortran77 - page 316 Table 6.1 Example: xint = 100 yint = sqrt(xint)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Functions What is a function? function - a separate body of code from the original  program, that performs a specific task. a single function may be used in multiple programs Function parts and syntax 1) function heading 2) specification part 3) execution part
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 17

Chapter6 - ComputerProgramming usingFortran77...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online