ENG 6 Lecture Notes - Lecture 8: C String Handling, Systemc, Empty String

70 views6 pages

Document Summary

Concept: procedural abstraction: permits a code block that solves a particular sub problem to be packaged and applied to different data inputs. Concept: encapsulation: putting a wrapper around a collection you want to protect from outside influence, encapsulate code in 2 ways: Variables declared within function are not visible from outside. Functions can only change values of variables within its own code body. Don t confuse scripts with functions: m-file scripts: Sequential execution of commands, top to bottom. Can be called by other m-file scripts. No passing of variables as arguments; when called. Function as a black box: parameters: formal parameters are names given to incoming data in function. are actual parameters provided to function. May have names different from formal parameter. Correlated to formal parameter names by position. Function elements to be returned are identified. Function name should correspond to m-file name. First line format for m-file function_name. m: function [ret1, ret2] = function_name(a1,a2)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents