Re: Porject 8 design


[ Follow Ups ] [ Post Followup ] [ CS1044 Web Discussion Board ] [ FAQ ]

Posted by William D McQuain on December 02, 2001 at 15:10:38:

In Reply to: Porject 8 design posted by Vinay Lakhani on December 02, 2001 at 08:44:21:

: In my design for project 8, I dont have any funtions calling other funtions except for main() calling everything.

I'd say that's probably a poor design.

Nor do I plan to have any because that makes simple stuff complicated

I disagree. Having function calls go several levels deep is not complex, in fact it's a good way of managing complexity.

and also it is a waste of execution time.

That is entirely irrelevant. Whether you have main() calling F() calling G() or have main() calling F() and then main() calling G(), you have two function calls (not counting program startup) and two function terminations. Precisely the same amount of work.

The former does require a little more memory for the run-time stack, but that's insignificant on any modern system.

So is that fine or do I risk losing points in H.W 7?

: Thank you very much
: Vinay Lakhani




Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS1044 Web Discussion Board ] [ FAQ ]