It's UWAweek 42 (2nd semester, week 12)

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 the 5 articles in this topic
Showing 5 of 738 articles.
Currently 50 other people reading this forum.


 UWA week 36 (2nd semester, mid-semester break) ↓
SVG not supported

Login to reply

👍x1
helpful

Hello,

My first question is one which is halting me and has already been posted about a few times (here and here) but is still yet to be answered. This is regarding the evaluation of non-returning functions. Can these be assumed to be equivalent to 0, or should assigning them cause an error?

The second is in the inconsistencies between how functions are called between examples. In Sample 6 we see the following:

print multiply(12, 6)

with no space between the function call and the brackets with parameters. However in Sample 5 there's this:

printsum (12, 6)

Where there is clearly a space between the two. Which is the right option?

Finally I have two questions about error handling given that there has been no error handling taught thus far within the unit. First- is a standard error message using perror with an undefined error 0 adequate? Such as:

[Custom error message]: Undefined error: 0

Lastly, does every error have to be handled by runml? Are there some errors that are able to be picked up within compilation of the C file, or does every error have to be dealt with specifically by the compiler we've written?

Thanks.


SVG not supported

Login to reply

👍?
helpful

was wondering the same for your second point


SVG not supported

Login to reply

👍?
helpful

"Harrison Lisle" [email protected] wrote:

Hello,

Hi Harrison

My first question is one which is halting me and has already been posted about a few times (here and here) but is still yet to be answered. This is regarding the evaluation of non-returning functions. Can these be assumed to be equivalent to 0, or should assigning them cause an error?

Sorry for the delay, unfortunately, there's been sudden changes to the teaching staff, so I have to wait for the new unit coordinator to clarify these questions.

The second is in the inconsistencies between how functions are called between examples. ... Where there is clearly a space between the two. Which is the right option?

Answered here https://secure.csse.uwa.edu.au/run/help2002?p=np&opt=U201

Finally I have two questions about error handling given that there has been no error handling taught thus far within the unit. First- is a standard error message using perror with an undefined error 0 adequate? Such as:

[Custom error message]: Undefined error: 0

perror is used for system call errors. As system calls have specific error numbers, perror interprets those numbers to create the error message. For this project you need to make custom error messages, to do this use fprintf, as shown below:

fprintf(stderr, "!error message");

Answered here: https://secure.csse.uwa.edu.au/run/help2002?p=np&opt=U172

Lastly, does every error have to be handled by runml? Are there some errors that are able to be picked up within compilation of the C file, or does every error have to be dealt with specifically by the compiler we've written?

Answered here: https://secure.csse.uwa.edu.au/run/help2002?p=np&opt=U153

Thanks. np


SVG not supported

Login to reply

👍?
helpful

Thank you very much! This is useful information- though I still am a bit stuck until the first question is answered...

I would also appreciate further clarification on the link in your answer. This doesn't seem to really answer the question... Chris just says:

Yes, all true, though the project won't be tested on these finer points of our tersely defined language In regards to a set of questions regarding whitespace... No clear-cut answer is given regarding specifically the calling of functions and whether they must have whitespace or whether they simply can. If the project "won't be tested on the finer points" which way is the project tested in, with or without whitespace?

I appreciate the help and understand that there are troubles for the teaching staff right now which may mean you are not able to give me an answer right away. Thank you.


SVG not supported

Login to reply

👍?
helpful

"Harrison Lisle" [email protected] wrote:

Thank you very much! This is useful information- though I still am a bit stuck until the first question is answered...

np.

I would also appreciate further clarification on the link in your answer. This doesn't seem to really answer the question... Chris just says: No clear-cut answer is given regarding specifically the calling of functions and whether they must have whitespace or whether they simply can. If the project "won't be tested on the finer points" which way is the project tested in, with or without whitespace?

It is this bit: "Otherwise, whitespace can (but doesn't need to) appear anywhere else"

In other words, both ways of calling the function as you have shown above are correct. A function call can have white space but doesn't need to have white space. I provided that post because it gives a full description of the expectations regarding white space.

I appreciate the help and understand that there are troubles for the teaching staff right now which may mean you are not able to give me an answer right away. Thank you.

Thanks for your understanding and patience, hopefully these issues will be resolved soon.

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  8:08AM Aug 25 2024
Privacy policy