第一个问题如上
它是哪个函数的抱错
CurrToStr ?
StrToCurr ?
IntToStr   ?
StrToInt64 ?另一个问题是在DELPHI中,如何实现C 中_LINE_宏 就是定位出错代码的行数呢?

解决方案 »

  1.   

    function StrToFloatDef(const S: string; const Default: Extended): Extended;
      

  2.   

    StrToCurr,StrToFloat
    出错代码的行数在'' is not a valid floating point value提示的前面就
    有呀。 
    例如:
    [Error] Unit1.pas(43): Undeclared identifier: 'Trasparent'
    就是说在Unit1.pas的43行有错。 你双击这个提示就会到达错误所在的行。
      

  3.   

    楼上说得对头,NIL可不能转换为浮点数!
      

  4.   

    lili1说的是编译的时候的行数 我是指运行的时候 有人说EurekaLog可以搞顶这个问题 
    但使用起来 异常出错有些问题
      

  5.   

    NIL可不能转换为浮点数,但是可以使用缺省值呀,郁闷
    例如
    StrToFloatDef(edit1.text,0);
    缺省值为0 。StrToFloatDef在SysUtils可以找到类似的还有StrToIntDef,
    StrToInt64Def,
    StrToBoolDef
    StrToCurrDef,
    StrToDateDef,
    StrToTimeDef,
    StrToDateTimeDef
      

  6.   

    strtofloat 
    strtofloatdef 
    怎么分别?
      

  7.   

    DELPHI5 没有 STRTOFLOATDEF 好象