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


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

Login to reply

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

"Mark Le Noury" [email protected] wrote:

Ok wow - the markdown is a bit different to what I am used to using. Lets try that again because there doesn't seem to be a way to edit my post:

Working code:

# 2 is printed
# 3 is printed afterwards
#
value <- 1
#
function increment
	value <- value + 1

# Function call with parens right against the name
increment()
print value

# Empty lines ignored:

# Function call with parens separated by a space
increment ()
print value

Should break due to missing value2 variable declaration:

# 2 is printed
# 3 is printed afterwards
#
value <- 1
#
function increment
	value <- value2 + 1

# Function call with parens right against the name
increment()
print value

# Empty lines ignored:

# Function call with parens separated by a space
increment ()
print value

Note there are no empty lines in ml, "empty lines" start with a #.

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