flowcharting functions
Author |
Message |
shoobyman
![](http://compsci.ca/v3/uploads/user_avatars/1894631788463006b596f19.gif)
|
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. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
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. |
|
|
|
![](images/spacer.gif) |
shoobyman
![](http://compsci.ca/v3/uploads/user_avatars/1894631788463006b596f19.gif)
|
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 |
|
|
|
|
![](images/spacer.gif) |
Windsurfer
![](http://photo-origin.tickle.com/image/118/9/8/O/118982819O270687078.jpg)
|
Posted: Thu Nov 02, 2006 9:03 pm Post subject: (No subject) |
|
|
That made no sense.
Care to reiterate? |
|
|
|
|
![](images/spacer.gif) |
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! |
|
|
|
|
![](images/spacer.gif) |
|
|