Advertisement
ramkesheoran

str2EnumAcrossLangs

Oct 3rd, 2011
2,622
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XPP 0.50 KB | None | 0 0
  1. static void str2EnumAcrossLangs(Args _arg)
  2. {
  3.     BankAccountType bat;
  4.     str sEnumValueNameLocalized;
  5.     int nInt;
  6.     ;
  7.     sEnumValueNameLocalized = enum2str
  8.         (BankAccountType::SavingsAccount);
  9.     info("Localized friendly string: "
  10.         + sEnumValueNameLocalized);
  11.  
  12.     nInt = str2Enum(bat, sEnumValueNameLocalized);
  13.     info("nInt = " + int2str(nInt));
  14. /********** Actual Infolog output
  15. Message (04:32:09 pm)
  16. Localized friendly string: Savings account
  17. nInt = 1
  18. **********/
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement