>> [Comp Sci Dept]
>> [R J Botting]
Tue Apr 27 11:56:05 PDT 2004
CSci620 Laboratory 10 Functions in C++
1 Recursion and activation records
Download, compile and run
[ 10fibo.cpp ]
and trace the activation records as it executes.
2 Parameter passing
Here are some examples of how a parameter handling works in C++.
Download, compile and test
[ 10flipper.cpp ]
which use pass by reference.
Recode it using pass by value of a pointer.
In other words, you may not put & in the header of the function,
and when the program is changed it still does the same thing.
Note. Call by name is alive and well in C++,
if you have time look at
[ name.cpp ]
for an example of Jensen's device from Algol 60.
. . . . . . . . . ( end of section CSci620 Laboratory 10 Functions in C++) <<Contents | Index>>
- BNF::="Backus-Naur Form", for syntax and grammar, developed by Backus and Naur.
- EBNF::="Extended " BNF.
- HTML::= "HyperText Markup Language", used on the WWW.
- HTML_page::syntax= "<HTML>" head body.
- Java::="An " OO " Language from Sun".
- LISP::= "LISt Processing Language".
- LRM::="Language Reference Manual".
- Prolog::="Programming in Logic".
- TBA::="To Be Announced".
- UML::="Unified Modeling Language".
- Universal_Resource_Locator::syntax= protocol ":" location, where
- protocol::= "http" | "ftp" | "mailto" | ... ,
- location::= O( "//" host) O(pathname).
(End of Net)
- WWW::= See http://www.csci.csusb.edu/dick/cs620/,
index to web site for this class.
- XBNF::="eXtreme" BNF, developed by the teacher from EBNF, designed
to ASCII input of syntax, semantics, and other formal specifications.
Formulae and Definitions in Alphabetical Order