Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The class web site has a link to a PDF file that contains the 1956 version of th

ID: 3572064 • Letter: T

Question

The class web site has a link to a PDF file that contains the 1956 version of the Fortran Programmer's Reference Manual. Use this manual to answer the following questions. Fortran originally had three kinds of GOTO statements. One was the unconditional GOTO, which jumped to a specified statement number. Another was the assigned GOTO, which we explored in Assignment 1. What is the name of the third kind of GOTO in original Fortran? Was this statement removed from Fortran in Fortran 95? If not, was it removed in Fortran 2003? Describe the syntax of this statement. Describe the semantics of this statement. This kind of GOTO can be used to implement a multiple-selection construct. Use this statement to convert the Java switch statement of problem 4(a) into original Fortran. Since original Fortran supports only uppercase letters, use I and J as the variable names.

Explanation / Answer

a)Fortran has 3 Types of Goto labels as follows:

1)Unconditional GO TO Statement

2)Assigned GO TO Statement

3)Computed GO TO Statement:It uses a small integer value to index a list of statement labels to jump

=======================================================================================

b)Computed GO TO Statement declared obsolescent in Fortran 95.Hence,it is removed in 95 version not 2003.

======================================================================================

c)Syntax:

where

s =label of an executable statement,

i=integer or real type expression

===========================================================================

d)Semantics:

Execution starts as follows:

Step 1:Interger expression i evaluated first

Step 2:After this control transfers so that ith statement in list of executable statements executed next.

======================================================================================

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote