Unified Control-Data Flow Diagrams (UCDF) Reference
Function calls
Functions
Generally, functions and function calls
are represented by two blocks. The first
is a function call operator and the next
is the function itself.
x = f (a,b);
int f (char _a, int _b)
1
2
3
main.c
myfile.c
int f (char _a, int _b)
1
2
3
main.c
myfile.c
The function call can be omitted
x = f (a,b);
int f (char _a, int _b)
1
2
3
main.c
myfile.c
char
int
int
return
a
b
x
char _a
int _b
int
return
1
2
3
//code using _a
//code using _b
return 3;
Passing arguments
If indicating the complete data flow
involving argument passing is necessary,
it can be shown like this,
though the picture is rather complicated.
x = f (a,b);
int f (char _a, int _b)
1
2
3
main.c
myfile.c
char
int
int
return
a
b
x
1
2
3
//code using _a
//code using _b
return 3;
Simpler
It can be simplified
It is the same memory location
two separate argument sets,
since they can be far apart
x = f (a,b);
int f (char _a, int _b)
1
2
3
main.c
myfile.c
a
b
x
1
2
3
//code using _a
//code using _b
return 3;
Simpler
or just
x = f (a,b);
int f (char _a, int _b)
1
2
3
main.c
myfile.c
a
b
x
Simpler
or
x = f (a,b);
1
2
3
main.c
a
b
x
Simpler
and two more versions:
int f (char _a, int _b)
1
2
3
main.c
myfile.c
a
b
x
Next
has
has
has
has
has
has
has