PPT-Ch 10: More on Variables and Subroutines
Author : celsa-spraggs | Published Date : 2016-07-22
CP212 Winter 2012 Topics Subroutines Functions Modular programming 3 Main Benefits Variable and Subroutine Scope Using and Passing Parameters Module level Global
Presentation Embed Code
Download Presentation
Download Presentation The PPT/PDF document "Ch 10: More on Variables and Subroutines" is the property of its rightful owner. Permission is granted to download and print the materials on this website for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Ch 10: More on Variables and Subroutines: Transcript
CP212 Winter 2012 Topics Subroutines Functions Modular programming 3 Main Benefits Variable and Subroutine Scope Using and Passing Parameters Module level Global variables Passing arrays. They may be explanatory or outcome variables however the focus of this article is explanatory or independent variable construction and usage Typically dummy variables are used in the following applications time series analysis with seasonality or re 1 Objectives A subroutine is a reusable program module A main program can call or jump to t he subroutine one or more times The stack is used in several ways whe n subroutines are called In this lab you will learn How to write subroutines and call th noxacuk Bela Tiwari btiwaricehacuk Subroutines get efficient So far The code we have looked at so far has been sequenti al do this do that now do something finish Problem You need something to be done over and over perhap s slightly differently depe reasons for subroutines. repeat . same code, or similar code with slightly different parameters. hide . design decisions or design complexity. partition . off code likely to change. provide . for separate compilation. Lecture 23: Today’s Goals • Use multiple files to write a C program • Share variables and labels between assembly files • Discuss how to pass parameters to C functions & Style: Main program and subroutines. INF 123 – Software architecture. tdebeauv@uci.edu. 1. Outline. Some theory. Connector 1: Procedure . call . Style: Main program and subroutines. Connector 2: Socket. Causes. (More Theory than Applied). . Peter Spirtes, Erich . Kummerfeld. , Richard Scheines, Joe Ramsey. 1. An example. Person 1. Stress. Depression. 3. Religious Coping. Task: learn causal model. Lecture 7: Subroutines and stack framesParameter passing though the stackAn exampleLocal variables and the stack frameand ULNK instructionsParameter passing through stack framesAn exampleThe need for 1 Introduction Call . suba. Call . suba. Call . suba. Next instruction. Next instruction. Next instruction. Start of subroutine. Subroutine . suba. Jump back. Only one copy of the code is placed in memory. Whenever we wish to use the code, a jump is made to it . Functions. & . Subroutines. (. procedures. in other languages) are subprograms that allow modular coding. Function. : returns a single explicit function value for given function arguments. Subroutine. 1. Walter F. Blood. Director of Product Management . Agenda. 2. Variables – A Quick Review. Variables in Reports. Variables in Procedures. Variables in Masters. A Quick Review. 3. The Basics. 4. Two types of Variable. • State-space representation.. • Linear state-space equations.. • Nonlinear state-space equations.. • Linearization of state-space equations.. 2. Input-output Description. The description is valid for. Branches . and Subroutines. Estimated . time . to . complete this lesson: 1 hour. In this lesson, you will . learn . how to:. Code Branches . and Subroutines. . Create subroutines by . using . Sub. and .
Download Document
Here is the link to download the presentation.
"Ch 10: More on Variables and Subroutines"The content belongs to its owner. You may download and print it for personal use, without modification, and keep all copyright notices. By downloading, you agree to these terms.
Related Documents