Declaring variable in flowchart

Dec 24, 2019 at 11:37pm
Hello b0ss,
Do you have to mention data type when declaring a variable in a flowchart?
Dec 25, 2019 at 1:30am
There are no fixed set of rules for working with flowcharts. The only rules are those your professor has made up for the purposes of the assignment.

Ask your professor or TA.
Dec 25, 2019 at 2:28am
On a flow chart it is quite in order to specify that a variable is a character, string integer, decimal or whatever. In fact it might be imperative.

Often the 'rules' simply mean you don't 'declare' what a variable type is by writing executable code.

eg Your chart might show:
Input the students name -> store as a string variable Name -> ...

You probably wouldn't write
std::string Name -> input Name ...
especially because your flowchart might never be implemented in C++, and/or the person reading it might not understand anything about programming/specific languages.

Flow charts flow at a high level. They don't get bogged down in the weeds.
Dec 25, 2019 at 2:29am
PS It's ( -> )an arrow here, not a pointer :)
Dec 25, 2019 at 3:05am
OK thank you b0ss
Topic archived. No new replies allowed.