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


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

Login to reply

👍?
helpful
3:27pm Thu 5th Sep, Joshua N.

ANONYMOUS wrote:
> each statement in a function's body (one-per-line) is indented with a tab character > > So for this, we don't need to check if its indented and return a syntax error, we just say that if the line isn't indented then we aren't in a function anymore.
Honestly it would be very hard to tell if a statement is meant to be in a function but it isn't. Since ml syntax allows statements to be inside or outside a function, there's no way of telling if they belong to a function if they aren't indented. The only statement you'd be able to know should be in a function is the return statement. Other than that, you just have to assume that if a statement isn't indented then it mustn't be part of the function.

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