Pergunta

The following is like reverse-engineering for code understanding. So here is the function:

void deleteTask(TaskPtr& head, const char* fullName)
{
    TaskPtr current, nodeToDelete;
    if(strcmp(head->fullName, fullName) == 0)
    {
        current = head;
        head = head->next;
        delete(current->address);
        delete(current);
        return;
    }

    for(current = head; current != NULL; current = current->next)
    {
        if(strcmp(current->next->fullName, fullName) == 0)
        {
            nodeToDelete = current->next;
            current->next = nodeToDelete->next;
            delete(nodeToDelete->address);
            delete(nodeToDelete);
            break;
        }
    }
}

How to show head and fullName args at flowchart (block diagram)?

Foi útil?

Solução

Found the variant of mentioning args within separate block that is connected with begin block by dot line. Like this:

enter image description here

Outras dicas

There is no standard for showing arguments on flowcharts. However, in UML, you could show arguments on UML Sequence Diagram on the directed arrow, as in some examples here: UML Sequence Diagrams. Arguments are shown on the diagram as: method_name(arg1, arg2, ..., argn).

I experienced same problem before i draw my flow chart by looking this example i am not sure it is officially valid flowchart or not but it doesn't matter right because the point is to convey your idea to reader clearly.

Flow chart example

Both answers are reasonable but second is more appropriate for flowchart drawing.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top