> Status � doesn't really need its own package though (unless �
I am definitely planning reuse.
> The line, bError? sMessage : "", is also still unnecessary.
Woops, great observation!
> � aren't using any object-oriented features
As Stroustrup said, he sees C++ as a �better C�, so I think of what I write as C++ all the time, even without coding
polymorphism, etc. :-)
> � using a special status object to handle errors still seems pretty odd.
Granted, it probably looks weird to seasoned Java programmers, but to me it compensates for my loss of a preprocessor that lets me write my own shorthand. Old habits die hard. :-)
> � replace all calls to System.out.println() with calls to your own cout()
You�re prescient: you�re reading my mind before I even had the idea. Writing that long string has been bugging me! Now, I�ve just got to decide on the syntax to distinguish between:
Maybe
cout/coutnl, though two extra letters my kill me. :-)
> RunExecutable(new String[] {"program.exe", "arg1", "arg2"})
That�s great syntax! Exactly the style I�m trying to adopt.
Finally, thanks again for all you help in educating me in Java. I�m sure our paths will cross again as I post other questions.
Regards,
Richard
P.S.
1.Obviously my post of the code omitted one thing: the subdirectory containing the (C++ based) binary executable that the
RunExecutable invoked. I should probably have mentioned that.
2.All the routines other than
main and
Status were based on published code from TechRepublic's Java Anthology
[ May 09, 2002: Message edited by: Richard Muller ]