Hi,
Enumeration|SG_Type_Status|Draft,Proposed,Released| | | Enumeration|SG_Type_TargetRelease|FELTON,AMIKI,BIRKI| | | Integer|SG_Type_Effort||-1|99| String|SG_Type_ID|||| Real|SG_Type_Real|||| Text|SG_Type_Text|||| Date|SG_Type_Date|||| Username|SG_Type_Username|||| CurrentlyI read the file into a text buffer (line by line), tokenize it and then create the attribute type from the single tokens -- this works fine for the Enumeration type, but for the Integer a need a 'int' parameter ... XML would be much better, but as I understood, there is currently no way .... Regards, Patrick SystemAdmin - Wed Jul 22 05:20:49 EDT 2009 |
Re: Conver a string to int string s="99" int i = intOf(s) print i "" |
Re: Conver a string to int IBM_Gust - Wed Jul 22 08:49:40 EDT 2009 |
Re: Conver a string to int IBM_Gust - Wed Jul 22 08:49:40 EDT 2009 Thanks a lot! |
Re: Conver a string to int int intOf(string) bool isValidInt(string) You may want to write a library function to do it, testing it with strange and invalid strings: -001, 00-1, abcde, 999999999999999999999 If the string is invalid, you need to decide if the function returns zero or minus-one.
|