Flowchart Design – How to Include Subroutines

flowchart

I am not really sure how to correctly describe my question, so please forgive me if this is a duplicate. I am creating a flowchart for my program where I implement a method. Let's assume I call this method someMethod.

The C code could look something like this:

bool someMethod(int Foo, int Bar)
{
    foo += 5;
    bar -= 5;
    return (foo == bar);
}

This means that my flowchart will have a subroutine block where I call this function. But how do I correctly show the reader which integers I pass?

And when I create the flowchart of "someMethod", I face a similar problem: how do I correctly show the reader that Foo and Bar are passed parameters?

EDIT:

From what I have found so far, people have solved it by using the Start block as some sort of function declaration block, where they would replace Start with someMethod and place foo and bar on a new line. But from what I understand this isn't good practice since the start and end of every flowchart should be blocks containing respectively Start and Stop.

I also have seen people using an IO-block as the first non-start block where they would "read" the passed parameters but that just seems like a hack.

But unless there are better ideas, I suppose I'll have to go with that.

EDIT 2:

I am starting to wonder if this question is actually valid for this site. Is nobody using flowcharts anymore as a project preparation method?

Best Answer

I've not drawn a flowchart in over 20 years. Thank goodness. By the time the chart is done the code could have been written, debugged, and deployed. Flowcharts were OK at a time when everything was card-punched and batch processed on mainframe computers that were doing priority production runs w/ your development work squeezed in between; computer time was very limited and very in demand. Turn-around time sometimes was days. Anyway, now a days the time and effort is simply a waste of time and effort.

Don't show a flowchart to a manager

It's too much detail and information. All trees, no forest.

Show Management Unified Modeling Language (UML) Diagrams

Here's an overview

There are 14 different diagrams but none are for line by line code detail. That's what the code is for! But you will find diagrams for different aspects and perspectives of your system.

Related Topic