Purchase Solution

Variables in a Programming Language

Not what you're looking for?

Ask Custom Question

Consider the following program:
List all the variables, along with the program units where they are declared, that are visible in the bodies of Sub1, Sub2, and Sub3, assuming static scoping is used.

procedure Main is
X, Y, Z : Integer;
procedure Sub1 is
A, Y, Z : Integer;
procedure Sub2 is
A, B, Z : Integer;
begin -- of Sub2
...
end; -- of Sub2
begin -- of Sub1
...
end; -- of Sub1
procedure Sub3 is
A, X, W : Integer;
begin -- of Sub3
...
End; -- of Sub3
Begin -- of Main
...
End; -- of Main

Purchase this Solution

Solution Summary

This response lists the variables and program unites of a body of programming language.

Solution Preview

The three variables X, Y, and Z are declared in the Main procedure and are available all ...

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

Javscript Basics

Quiz on basics of javascript programming language.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.