I've been working on this idea for a couple months now (starting with my thread about chat-styled scrolling), as it is the basis for my idea of a hacker-styled TI-BASIC game, my very first programming project, yay. xD
Now, my question, or challenge, if ya want to look at it like that. How would you program a command-line interface? For those of you who aren't super tech-savvy (including myself, as I had to look it up first :P), a command-line interface is "a means of interacting with a computer program where the user (or client) issues commands to the program in the form of successive lines of text (command lines)." - Wikipedia.
In-short, it works just as MS-DOS or Command Prompt would. A user types in commands, say "connect 192.168.2.1" in my case, and the program will then modify some variables and respond with a line, such as, "Base:\192.168.2.1 connected."
I've come up with a handful of ideas myself, including inString(, lists and inputs and such, but a second or third opinion on how to go about this would be fantastic. ^.^ Also, it gives the community something to think and ponder about, which is always awesome. Keep it active n' stuff.
I'll be sure to include anyone in the credits who comes up or leads me to a good strategy about this.
Thanks guys! If you go as far as creating your own program to attempt this, (which, btw, I'm incredibly thankful for :D), here are some examples you can try out.
Response: (Commands that merely display pre-written strings)
"about" - "hck.exe v1.0"
"ping" - "Reply from tgt: t=15"
"network" - "1. Base."
Variable: (Commands that change variables)
"connect" - Unlocks the command below and displays "CONNECTED."
"analyze" - Unlocks the command below and displays "COMPUTER WEAKNESS FOUND."
"send" - Displays "COMPUTER HACKED" and ends the program.