Raised This Month: $ Target: $400
 0% 

[ Solved ]switch string


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-09-2015 , 18:25   Re: [ Solved ]switch string
Reply With Quote #1

An enum doesn't satisfy what you are requesting in post #3. However, the best you could do is use a Trie to get an integer (that is associated with the input string) to use in your switch.

Based on the purpose of the code in post #1, you should be using integers or enums anyways. I'm glad you found the answer.

All 'good' scripters try stuff on their own before asking "will this work" unless it's extremely complicated.
__________________

Last edited by fysiks; 01-09-2015 at 18:27.
fysiks is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:23.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode