Which control mechanism?
Blitz3D Forums/Blitz3D Beginners Area/Which control mechanism?
| ||
Ok I have my network chat program working nicely. Now i want to add more functionality. At the moment i have code like if chat$="/who" then print_list_of_users() else send_chat_to_network(chat$) endif howver i now want to check for chat starting /tell and /ver and i am sure a load more commands. What should i use? (nested IF...Then.. or CASE or something else?) Thanks |
| ||
The Select control allows for nice, readable code with a whole bunch of cases. That's what it's made for. |
| ||
Personally I would use some Else If commands, but at runtime it probably doesn't differ much from Select. |