Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 flowcharting functions
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
shoobyman




PostPosted: 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
Sponsor
sponsor
Tony




PostPosted: 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.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
shoobyman




PostPosted: 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




PostPosted: Thu Nov 02, 2006 9:03 pm   Post subject: (No subject)

That made no sense.
Care to reiterate?
profchen




PostPosted: 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!
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: