Table of Content
HAL Forum
function Val StringToVal (
String valstr,Integer valuetype)
Description:
Data conversion - from String to Value
Parameters:
valstr String with value
valuetype subtype for Value Type
global
procedure CalcExtra(val bp,string extra,var val res)
BEGIN
  string 255 tstr;
  val v;

  res = blankval;
  tstr = extra;
  if (nonblank(tstr)) then begin
    if (Mid(tstr,len(tstr)-1,1)=="%") then begin
      tstr = Left(tstr,len(tstr)-1);
      v = StringToVal(tstr,M4Val);
      res = bp*v;
      res = res/100;
    end else begin
      res = StringToVal(tstr,M4Val);
    end;
  end;
  RETURN;
END;
Related topics:
««