Map
Index
Random
Help
Topics
th

Topic: function definition

topics > computer science > programming > Group: function



Group:
parameters

Topic:
abstraction in programming language
Topic:
definition
Topic:
function syntax by pattern
Topic:
function syntax definition
Topic:
handling complexity
Topic:
identifying program modules
Topic:
named constants and expressions
Topic:
macros
Topic:
words defined by words

Summary

The method of defining a function. Curious stuff: function definition is delayed execution, often a literal. This is a key topic.

Functions are defined by specifying a label and a function body. The label defines the function's syntax while the function body defines its semantics and external visible effects. Function definition constructs a new object. Use of a function name within a definition refers to the previous meaning of the function, or it makes the function recursive. The function body operates on parameters, local objects and global objects. Statements within a function body could have been executed directly, but with function definition, execution is delayed until the function is called. A mathematical function can be defined by a table or graph, a data flow function delimitates a sub-set of connected components in the state graph. Attributes may be associated with a function defining its type, value, reentrancy, priority, cost, and monitor information. An example of use may be added. (cbb 5/80)

Subtopic: building complex from simple up

Quote: build complex constraints from simple ones by abstraction: recursive embedding, parameterization, and type declaration [»deutLP1_1981]
Quote: use routines to reduce complexity by hiding the details [»mccoS7_1998]

Subtopic: defining a function up

Quote: a sub-graph becomes a function by naming it; the crossed data paths become its inputs and outputs [»kosiPR9_1973, OK]
Quote: the definition of word consists of its type and an attribute list (its meaning) [»bennRK7_1976]
Quote: a functional programming system is made of a fixed set of functional forms [»backJ8_1978a]
QuoteRef: moorCH6_1974 ;;504 defining words as parameters to the definition interpreter
QuoteRef: grayJC_1973 ;;170 in L*, function definition is similar to do loop
Quote: the procedure body uses operations defined for parameters and class objects [»hendP9_1975]
Quote: AST systems can retrieve the whole state, retrieve the definition of a function, or compute the new state [»backJ8_1978a]
Quote: the value of a procedure object is its definition; it may have an optimized, compiled version as well [»heerJ4_1985]

Subtopic: syntax up

Quote: in Forth, ':' compiles words instead of executing them [»moorCH6_1974]
Quote: example of defining a new command in TRAC: #(ds,aa,the rat)
Quote: a Pseudo-code module consists of a heading, a declare section and a body [»jardDA5_1981]
QuoteRef: wulfWA12_1971 ;;785 function names are expressions eg (CASE .x of set p1, p2, p3 tes) (.z) [defines a function of one variable cbb/97]
QuoteRef: morrJH8_1972 ;;757 function definition by literal sequence eg u<-<<(argl<- real, arg2<-int|-> result <-real, expression) with post arg list u(1,2)
QuoteRef: reinJ11_1971 ;;38 start program definition by the key statement SUPPRESS
QuoteRef: elcoEW_1971 ;;486 define new operations by '=
QuoteRef: rainM1_1973 ;;13 define operations by OP abs (Val int a)=(a if operand < O then -fi) $; generates a test skip over a negate
QuoteRef: goldA3_1976 ;;19 in a definition "Everything following the name is its value

Subtopic: describe function up

Quote: operator definition includes operand names, a description, and examples [»bennRK6_1968, OK]
Quote: add assertions which give the correct result for an example execution; machine-checked; made program easier to understand [»morrJH_1980]

Subtopic: redefinition up

Quote: can redefine operations in terms of previous values since evaluation occurs before binding values to names [»demeA3_1979]
Quote: if redefine a name in the dictionary, earlier uses continue to refer to the old definition (already compiled) [»jameJS9_1978]

Subtopic: tabular definition up

QuoteRef: sammJE_1969 ;;241 definition of functions by equation or data (table) also high and low bounds on argument (domain)

Subtopic: anonymous functions up

Quote: anonymous inner classes implement closures; e.g., makeAdder(n)
[»bensBW2_1999]

Related Topics up

Group: parameters   (10 topics, 145 quotes)

Topic: abstraction in programming language (47 items)
Topic: definition (17 items)
Topic: function syntax by pattern (15 items)
Topic: function syntax definition (17 items)
Topic: handling complexity (60 items)
Topic: identifying program modules (26 items)
Topic: named constants and expressions (21 items)
Topic: macros (22 items)
Topic: words defined by words
(25 items)


Updated barber 6/04
Copyright © 2002-2008 by C. Bradford Barber. All rights reserved.
Thesa is a trademark of C. Bradford Barber.