CMPUT174 Lecture Notes - Delimiter, Equals Sign, Function Object

12 views1 pages
5 Feb 2023
Course
Professor
ceruleanzebra152 and 30 others unlocked
CMPUT174 Full Course Notes
25
CMPUT174 Full Course Notes
Verified Note
25 documents

Document Summary

A function call is a new kind of expression. Syntactically, a function call consists of a function name, followed by an opening parenthesis, which is a delimiter token, optionally followed by arguments, and ending with a closing parenthesis, which is also a delimiter. For now we are only interested in built-in functions, so the function name will be an identifier which is simply the name of the built-in function, such as len, input, pow or type. At this point, arguments either contain a single expression, or contain two or more expressions, separated by commas, where a comma is a delimiter. Dereference a function name to obtain a function object. Evaluate each argument expression to obtain argument objects. Ensure number of argument expressions in function call matches number of argument objects expected by function definition. Pass each argument object to the function definition in order. Function call returns an object as the result of evaluating it.

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

Related Questions