W wooiguo Unregistered / Unconfirmed GUEST, unregistred user! 2007-02-13 #1 字符串是Y或者N,怎样通过判断转换或得到Boolean型的True或False? (不是字符串True或False)
L lxw5214 Unregistered / Unconfirmed GUEST, unregistred user! 2007-02-13 #2 自己写个函数好了: function stringToBool(s:string): boolean; begin if (s='y') or (s='Y') then result := true else if (s='n') or (s='N') then result := false; end;
自己写个函数好了: function stringToBool(s:string): boolean; begin if (s='y') or (s='Y') then result := true else if (s='n') or (s='N') then result := false; end;
3 3868474 Unregistered / Unconfirmed GUEST, unregistred user! 2007-02-13 #3 function b(s: string): boolean; begin result := s = 'Y'; end
W wooiguo Unregistered / Unconfirmed GUEST, unregistred user! 2007-02-13 #4 看来没有现成的函数,不过能用就行. 谢谢lxw5214. 再谢3868474已经帮我多次了.