/* Copyright (c) 1990, Silverwood Software
 * Placed in the public domain, 11/01/90
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * Database record class enabling fields in array format */!!

inherit(Object, #Record, #(flds  /* array that holds fields */), 2, nil)!!

now(class(Record))!!

now(Record)!!

/* comment */
Def getFlds(self,elem)
{ ^flds[elem];
}
!!

/* comment */
Def initFlds(self,val)
{ flds:=new(Array,val);
  do(val,
    { using(e)
      flds[e]:="";
    });  
}
!!

/* comment */
Def putFlds(self,elem,strg,len | s)
{ if size(strg)>len then
    s:=delete(strg,len,size(strg));
  else
    s:=strg+fillWith(" ",len-size(strg));  
  endif; 
  flds[elem]:=s;
}!!
