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 selected article
Showing 1 of 738 articles.
Currently 172 other people reading this forum.


 UWA week 37 (2nd semester, week 7) ↓
SVG not supported

Login to reply

👍?
helpful
8:45pm Wed 11th Sep, Joshua N.

"Harrison Lisle" [email protected] wrote:

Hello!

I have a few questions about expressions- best set up with a few excerpts from the project document. In section 4 of project requirements the following is said:

"your program will not be tested with any invalid expressions, so you do not need to validate the syntax of expressions."

Though, it is also said that:

"a function must have been defined before it is called in an expression" "variables do not need to be defined before being used in an expression, and are automatically initialised to the (real) value 0.0"

So, may I take it that there DOES need to be validation of expressions? How far does this not testing with invalid expressions go? If there truly was no invalid expressions and thus no need to syntax check the expressions, the automatic initialisation of variables would not matter and no invalid functions would appear.

Here is my set of questions:

  1. Does each function called in an expression need to be checked for having the correct number of parameters?
  2. More generally in a function call, does the function need to be checked for having the correct number of parameters?

In regards to variables not needing to be defined before calling- do these variables count towards the total number of identifiers, and can they be assigned to afterwards without increasing the number of identifiers?

Additionally, do function parameters and local variables count towards the grand total number of identifiers?

Thank you.

Best to ask Amitava.

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