flowcharting functions
Author |
Message |
shoobyman

|
Posted: Sun Oct 29, 2006 3:50 pm Post subject: flowcharting functions |
|
|
code: | var pi: real:= 3.14
var radius: real
function circle(radius:real):real
result (2*pi*radius)
end circle
put "enter radius"
get radius
put "Perimeter of circle is ", circle (radius)
|
ok, i am ok at doing flowcharts, but I have no idea how to flowchart a function and i need some help. can anyone give me an example of a flowchart for a function
btw i know this is off topic, but i am out of time and i can't find anywhere to get help from. |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Tony

|
Posted: Sun Oct 29, 2006 4:01 pm Post subject: (No subject) |
|
|
I would think of a function as a box that takes values in, and returns another value. It doesn't matter what's going on inside a function, but one could explain that in a chart of its own. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
shoobyman

|
Posted: Sun Oct 29, 2006 4:07 pm Post subject: (No subject) |
|
|
o, you mean like a procedure?
that would work nicely. thanks for the help |
|
|
|
|
 |
Windsurfer

|
Posted: Thu Nov 02, 2006 9:03 pm Post subject: (No subject) |
|
|
That made no sense.
Care to reiterate? |
|
|
|
|
 |
profchen
|
Posted: Thu Nov 02, 2006 11:55 pm Post subject: (No subject) |
|
|
Not sure what you're trying to flowchart...
At a high level, a function is just a rectangle that you enter and leave, and then you implement the function elsewhere. At a low level, you just flowchart the code of the function.
On the flip side, you should see my post for a "web-based programming editor". It lets you write Turing programs through flowcharts. If the flowchart you draw can generate the code that you've written, then you have a flowchart for your code! |
|
|
|
|
 |
|
|