This week's book giveaway is in the
We're giving away four copies of
Node.js in Action
and have Mike Cantelon, Marc Harter, T.J. Holowaychuk and Nathan Rajlich on-line!
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Node.js in Action
this week in the
how to handle a NULL args value
Joined: Mar 10, 2004
Apr 22, 2005 07:53:00
When passing in a long
of args values, if the DBO value is NULL, it shifts the whole lineup of args values in by 1 position!
Is there a better way to handle NULL args values or is there a better way to pass a large list of args values into a Java program?
java -classpath .:$B/$C:$JDBC:$J1:$J2:$J3:$J4 HlpValOraExtXml1$HOS $POS $SID $USR $PAS $DBO $FILE $XD/$1.xml $DD/hlpddl 'debug'
Joined: Aug 07, 2003
Apr 22, 2005 09:07:00
You can quote the arguments so they show up as empty strings when they have no value.
... "$POS" "$SID" ...
Marilyn de Queiroz
Joined: Jul 22, 2000
Apr 22, 2005 11:18:00
You could do a check at the beginning of the app to verify that you have the correct number of args passed in.
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Joined: Dec 06, 2001
Apr 22, 2005 15:38:00
If some arguments are optional, you can use a flag (like -d) to indicate that the next argument is the optional argument.
Java API Documentation
The Java Tutorial
I agree. Here's the link:
subject: how to handle a NULL args value
Pl. Help Urgent
JDBC-- Not executing rs.next()
Can't declare a Sybase Cursor for StoredProcedures using Spring
what does (String[ ] args) mean?
Hibernate mapping doubt
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014