Adding an Option

I have a file that takes 2 or 3 arguments...
ie: $argv(2), $argv(3)

If I had to add another argument, I would be ok, but nooo.. that would be too easy for the new programmer. Before you go there - This is not a school problem, it's a real world problem..

If I wanted to add an option, for example,
run the script with a -c <filename> as an option, can I mix this option with the arguments structure?

Also, would this be a getopt(s) kind of option I have to add to the script?

Thanks for your time.

Bruce

I typically process arguments with something like

for d in $@
do
	if test -n "$LASTFLAG"
	then
		case "$LASTFLAG" in
			-o ) AR_TGT="$d" ;;
			-soname ) MODNAME="$d" ;;
		esac
		LASTFLAG=""
	else
		case "$d" in
			-l* )
				 ADLIB=`echo $d | sed s/-l//`
				 ;;
			-L* ) if test "$d" = "-L"
				  then
					LASTFLAG=$d
				  fi
				 ;;
			-o | -soname  ) LASTFLAG=$d ;;
			*.o ) OLIST="$OLIST $d" ;;
			* ) echo $0: error at argument $d
				exit 1
				;;		
		esac
	fi
done