It's UWAweek 30 (2nd semester, week 1)

help2002

This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.
Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.
Displaying selected article
Showing 1 of 1168 articles.
Currently 8 other people reading this forum.


 UWA week 34 (2nd semester, week 5) ↓
SVG not supported

Login to reply

👍?
helpful
3:43am Sat 26th Aug, Christopher M.

ANONYMOUS wrote:
> Will I penalised for using global variables?
You gain marks for good practices. There is no 'negative marking', so you do not lose marks for anything. Marking starts at 0% and goes upwards, not from 100% going downwards.
> I've heard that it's bad practice in C, but I don't see how I could possibly pass half a dozen state variables to every function, plus the other variables specific to each function. I could make a struct and put the necessary variables in the struct, but I'd still have to pass that struct to every function. Is there a better way, or should I just continue with my global variables?
The use of global variables was discussed in Friday's Workshop #5. Please review the recording. The use of *too many* global variables is considered a bad practice in any programming language (that supports them).

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  7:24AM Jul 25 2024
Privacy policy