So basically, you read a console command and need to parse it?
The command read, should be in some string and you can use the split function to obtain an array of strings between the designed separators.
You read this into the inputCommandString.
Tehn you can obtain the order and the parameters usint the split function:
dim orderAndParameters as string() = inputCommandString.Split(" "c)
Then you can verify the order and parameters by using a select - case structure:
case 0 ' no order nor parameters
' send a message? or ignore it?
case 1 ' only an order
' verify if the order is one of the possible orders without parameters or show the order usage in case of wrong number of parameters
case 2 ' the order and one parameter
case else ' not defined.
Also a regex can help to analyze if the command and parameters structure is right.
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...