[Pas2js] My 1st type helper
    warleyalex 
    warleyalex at yahoo.com.br
       
    Thu Feb 28 12:14:02 CET 2019
    
    
  
# pas2js-windows-1.4.0RC3
-------------------------------------------------------------
type
 Float = double;
type
 TFloatHelper  =  type helper for Float
   const NPI = 3.141592;
   function ToStr: String;
 end;
implementation
function  TFloatHelper.ToStr: String;
begin
  Result:=  FloatToStr(Self);
end;
end.  
(...)
var
  ReturnValue : Float;
begin
  ReturnValue := 2.71;
  console.log(ReturnValue.ToStr);
-------------------------------------------------------------
Fatal: bug: uncaught EStackOverflow: Stack overflow
Fatal: EStackOverflow: Stack overflow
-------------------------------------------------------------
--
Sent from: http://pas2js.38893.n8.nabble.com/
    
    
More information about the Pas2js
mailing list