Table of Content
HAL Forum
function VAL EvalToVal (
String defstr)
Description:
It take a string containing text and evaluate it
Parameters:
defstr String to evaluate (can be functions too)
procedure KeyBlockRowExport(record RcVc KeyRepSpec,string code,string comment,string defstr,Integer i,var Boolean Outf)
BEGIN
  val v;
  Integer j;
  string 255 tstr

  if (nonblank(KeyRepSpec.FirstAcc)) then begin
    if (code==KeyRepSpec.FirstAcc) then begin
      Outf = true;
    end;
  end;
  if (Outf) then begin
    if (KeyRepSpec.flags[2]!=1) then begin
      if (KeyRepSpec.flags[0]==1) then begin
        ExportString(code);
        ExportString(comment);
      end;
    end;
    if (KeyRepSpec.flags[1]==1) then begin
      ExportString(""); // startbal 
      for (j=KeyRepSpec.sm1;j<=KeyRepSpec.em1;j=j+1) begin
        KeyRepSpec.sStartDate = IntMonthToDate(j);
        KeyRepSpec.sEndDate = IntMonthToDate(j+1);
        KeyRepSpec.sEndDate = AddDay(KeyRepSpec.sEndDate,-1);
        v = EvalToVal(defstr);
        SetTransVal(code,v);
        ExportVal(v,M4Val);
      end;
    end else begin
      v = EvalToVal(defstr);
      ExportVal(v,M4Val);
    end;
    NewLine;
    UserTrace(comment,M4Str);
  end;
  if (nonblank(KeyRepSpec.LastAcc)) then begin
    if (code==KeyRepSpec.LastAcc) then begin
      Outf = false;
    end;
  end;
  RETURN;
END;
Related topics:
««