Table of Content
HAL Forum
function Val Round (
Val v,Roundmode rmode)
Description:
returns a number rounded to a certain number of decimal places
Parameters:
v value
rmode round mode
global 
function val RoundVAL(val v,LongInt roundto,Integer typ)
begin
  val res;
  LongInt lroundto;
  roundmode rnddef;
  
  lroundto = roundto;
  rnddef = DefaultValRoundoff;
  if (lroundto<0) then begin lroundto = rnddef.decimals; end;
  switch (typ) begin
    otherwise
      res = Round(v,SetRoundModeD(lroundto));
  end;
  RoundVAL = res;
  return;
end;
Related topics:
««