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


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

Login to reply

👍?
helpful
8:02am Wed 4th Sep, Joshua N.

"Mark Le Noury" <23*6*4*5@s*u*e*t*u*a*e*u*a*> wrote:
> That would be hard to do without building a full-blown syntax parser, how would you figure out how many parameters are in this function call: > > function_name((x+1)-2, function2((a-1),b))
I'm not sure if it is necessary but it does sound like fun (if you're me anyway). You could check the number of arguments by counting the number of commas and the number of open brackets without a closing bracket. If number of open brackets is 1, then count the commas, otherwise ignore the commas. E.g. the number of commas counted in the above expression would be 1, so there are 2 parameters total.

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