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 the 4 articles in this topic
Showing 4 of 828 articles.
Currently 93 other people reading this forum.


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

Login to reply

👍?
helpful
1:19pm Sun 15th Sep, ANONYMOUS

When passing the extra real optional command line arguments to the ml file. Do we have to pass them as command line arguments fully to the translated ml file when it is compiled and run. Or can we simply write them into the the translated file as identifiers? Additionally, do we have to verify the ml file has received the correct number of inputs, ie do we have to find all arg<some number> instances, determine their argument index and then make sure we have a number of inputs equal to the highest instance of that, returning an error prior to compiling. Or can we assume that we will be given the correct number of inputs, in accordance with "EXCEPT that your program will not be tested with any invalid expressions, so you do not need to validate the syntax of expressions." Given command line arguments should only ever appear in expressions, this appears to be something we should not be required to check for, however I wanted to double check this is an acceptable assumption.


SVG not supported

Login to reply

👍?
helpful
2:22pm Sun 15th Sep, Joshua N.

ANONYMOUS wrote:
> When passing the extra real optional command line arguments to the ml file. Do we have to pass them as command line arguments fully to the translated ml file when it is compiled and run. > > Or can we simply write them into the the translated file as identifiers?
Write them to the file into their respective identifiers. E.g. arg0 is argv[2]
> Additionally, do we have to verify the ml file has received the correct number of inputs, ie do we have to find all arg<some number> instances, determine their argument index and then make sure we have a number of inputs equal to the highest instance of that, returning an error prior to compiling.
> Or can we assume that we will be given the correct number of inputs, in accordance with "EXCEPT that your program will not be tested with any invalid expressions, so you do not need to validate the syntax of expressions." Given command line arguments should only ever appear in expressions, this appears to be something we should not be required to check for, however I wanted to double check this is an acceptable
assumption. I believe Chris said that you can assume the appropriate number of command line arguments are passed to the ml program: [help2002]


 UWA week 38 (2nd semester, week 8) ↓
SVG not supported

Login to reply

👍?
helpful
3:43pm Mon 16th Sep, ANONYMOUS

I am OP, I just wanted to comment i've read the post you linked and it appears Chris said the opposite for anybody else who see's this. I have hence implemented the ability to check user inputs.


SVG not supported

Login to reply

👍?
helpful
8:33pm Mon 16th Sep, Joshua N.

ANONYMOUS wrote:
> I am OP, > > I just wanted to comment i've read the post you linked and it appears Chris said the opposite for anybody else who see's this. I have hence implemented the ability to check user inputs.
Hi sorry, you are right. I misread what he said. Thanks for letting everyone know.

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