It's UWAweek 47

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 828 articles.
Currently 102 other people reading this forum.


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

Login to reply

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

"Samay Gupta" <23*6*5*8@s*u*e*t*u*a*e*u*a*> wrote:
> 1) Under the Our ml Language headline, it says, "only a single datatype is supported - real numbers, such as 2.71828", and, "variables do not need to be defined before being used in an expression, and are automatically initialised to the (real) value 0.0". Whereas, under the Project Requirements headline, it says, "When printed, numbers that are exact integers must be printed without any decimal places", and, in sample04.ml file the output required is in the integer data type, which as stated under 'our ml language' headline, is not supported by the language.
You need to change the format string of printf so that you print the double without any decimal places. Answered here: [help2002]
> 2) The project assessment section states that "runml.c" code shall compile using command "cc -std=c11 -Wall -Werror -o runml runml.c", but it doesn't confirm if the translated code should be compiled with "-Wall -Werror" flags or just "cc -std=c11 -o myoutput myoutput.c"?
I would say so. Some warning in C are straight up errors and result in strange behaviour when run.
> 3) Some gcc/cc compilers allow nested functions as extension, e.g. a function can be declared within the main() function. Can you please confirm if nested functions are permissible in this project or not.
Nested functions aren't allowed.

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