It's UWAweek 48

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 8 articles in this topic
Showing 8 of 919 articles.
Currently 3 other people reading this forum.


 UWA week 40 (2nd semester, week 10) ↓
SVG not supported

Login to reply

👍?
helpful
11:26am Wed 5th Oct, ANONYMOUS

Hi there, can all 3 options '-b' '-r' '-u' be toggled at once or are they singluar like only one can be called at once? So is it: -b OR -r OR -u, or can you accept multiple? At the moment I thought of it as being seperate options and not being able to overlap so just clarifying. Thanks, sorry if is a silly question.


SVG not supported

Login to reply

👍?
helpful
11:32am Wed 5th Oct, Christopher M.

ANONYMOUS wrote:
> Thanks, sorry if is a silly question.
Not a silly question. Exactly zero or one of them may be provided - that's what the (cryptic) notation "[-b | -r | -u]" means.


SVG not supported

Login to reply

👍?
helpful
11:36am Wed 5th Oct, ANONYMOUS

awesome thanks


SVG not supported

Login to reply

👍?
helpful
10:35pm Wed 5th Oct, Lloyd N.

Hi Chris, If we end up choosing none of the 3 options (b,r and u) how would our program know if we are trying to invoke prompt.1 (./trove [-f trovefile] word) or prompt.2 (./trove [-f trovefile] [-b | -r | -u] [-l length] filelist)? Since in prompt.2 both options f and l are optional, we can leave them out from the command-line. So if we choose none of the 3 other options (b, r and u), prompt.2 will just become prompt.1 with the filelist argument acting as the word argument. Thank you!


SVG not supported

Login to reply

👍?
helpful
10:39pm Wed 5th Oct, Lloyd N.

Actually never mind, I was thinking about this the wrong way.


SVG not supported

Login to reply

👍x1
helpful
3:24am Thu 6th Oct, Christopher M.

"Lloyd Na" <23*3*1*[email protected]*u*e*t*u*a*e*u*a*> wrote:
> If we end up choosing none of the 3 options (b,r and u) how would our program know if we are trying to invoke prompt.1 (./trove [-f trovefile] word) or prompt.2 (./trove [-f trovefile] [-b | -r | -u] [-l length] filelist)? Since in prompt.2 both options f and l are optional, we can leave them out from the command-line. So if we choose none of the 3 other options (b, r and u), prompt.2 will just become prompt.1 with the filelist argument acting as the word argument.
Yes, anything within square brackets [...] is optional, and any use of the square brackets may occur in any order. It's exactly the same notation as you've seen in nearly every online manual for a command (in section 1 of the manual) - man cal


SVG not supported

Login to reply

👍?
helpful
4:50pm Sun 9th Oct, ANONYMOUS

"Lloyd Na" <23*3*1*[email protected]*u*e*t*u*a*e*u*a*> wrote:
> If we end up choosing none of the 3 options (b,r and u) how would our program know if we are trying to invoke prompt.1 (./trove [-f trovefile] word) or prompt.2 (./trove [-f trovefile] [-b | -r | -u] [-l length] filelist)? Since in prompt.2 both options f and l are optional, we can leave them out from the command-line. So if we choose none of the 3 other options (b, r and u), prompt.2 will just become prompt.1 with the filelist argument acting as the word argument.
Could someone please clarify this. If we include no options when invoking trove, and only one additional command line argument is provided (a single word or single filename), should we assume that we want to invoke prompt.1 or prompt.2? Or is there perhaps some other way to differentiate between the two?


SVG not supported

Login to reply

👍?
helpful
5:19pm Sun 9th Oct, Christopher M.

ANONYMOUS wrote:
> "Lloyd Na" <23*3*1*[email protected]*u*e*t*u*a*e*u*a*> wrote: > > > If we end up choosing none of the 3 options (b,r and u) how would our program know if we are trying to invoke prompt.1 (./trove [-f trovefile] word) or prompt.2 (./trove [-f trovefile] [-b | -r | -u] [-l length] filelist)? Since in prompt.2 both options f and l are optional, we can leave them out from the command-line. So if we choose none of the 3 other options (b, r and u), prompt.2 will just become prompt.1 with the filelist argument acting as the word argument. > > > Could someone please clarify this. If we include no options when invoking trove, and only one additional command line argument is provided (a single word or single filename), should we assume that we want to invoke prompt.1 or prompt.2? Or is there perhaps some other way to differentiate between the two?
With exactly one of -b, -r, or -u you are building or modifying a trove-file. With none of those options you are searching an (existing) trove-file.

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  1:17AM Sep 14 2022
Privacy policy