老兄!!给分!!val(e11.Text,tmpstr,i);这句是什么意思啊!!参数个代表什么意思!!

解决方案 »

  1.   

    Converts a string to a numeric representation.UnitSystemCategorystring handling routinesDelphi syntax:procedure Val(S; var V; var Code: Integer);DescriptionIn Delphi code, Val converts the string value S to its numeric representation, as if it were read from a text file with Read.S is a string-type expression; it must be a sequence of characters that form a signed real number. V is an integer-type or real-type variable. If V is an integer-type variable, S must form a whole number. Code is a variable of type Integer.If the string is invalid, the index of the offending character is stored in Code; otherwise, Code is set to zero. For a null-terminated string, the error position returned in Code is one larger than the actual zero-based index of the character in error.Val performs range checking differently depending upon the setting of the $R compiler directive and the type of the parameter V.
      

  2.   

    字符串转数值型的函数
    s是要转换的字符串,
    v是保存转换后的数值,
    code是转换出错的位置
      

  3.   

    哥们,我告诉你
    是这样的,val是把字符串转换成数值的,但是字符串必须是一数值的
    val(e11.Text,tmpstr,i)中
    ell.text是要转换的字符串
    tmpstr是转换后用来盛放数值的参数
    i是转换过程中产生错误号