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 11 other people reading this forum.


 UWA week 35 (2nd semester, week 6) ↓
SVG not supported

Login to reply

👍?
helpful
11:02am Thu 31st Aug, Jacob R.

Yeah, of course. I just know some people really dislike global variables within programs and will actively try to get rid of them at the expense of readability. As it is, I've used a struct containing double pointers instead of global variables for the functions that require access to most or all of them, and then the other functions only receive pointers or double pointers as required by them based on whether they need to edit the value outside of the function. I mean my program already made use of a lot of pointers and malloc, so I don't believe its readability has been changed a lot, and it definitely comes down to who's reading it and their experience. Of course. Designing the project without pointers would make some aspects of it more difficult, but I'm excited to see how it turns out, and the progress that is made on the sample solution. With "the scope of the variable is almost global or global", I was referring to the necessary scope of the variable and whether it needed to be changed or read by most functions or if it could easily just be passed as an argument. Thanks Chris.

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