home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / languages / rlab1_23a / CTB / strcom < prev    next >
Text File  |  1995-11-14  |  642b  |  33 lines

  1. //----------------------------------------------------------------------
  2. //
  3. // strcom
  4. //
  5. // Syntax: b=strcom(a)
  6. //
  7. // This routines takes a string that has been split in to columns using
  8. // strsplt and recomines them into the string b which is returned.
  9. //
  10. // Author: Jeff Layton 6/20/93
  11. // Version JBL 930620
  12. //----------------------------------------------------------------------
  13.  
  14. strcom = function(a)
  15. {
  16.    local(nc,i,b,bdum)
  17.  
  18.    nc=a.nc;
  19.  
  20.    if (nc == 0) {
  21.        error("strcom: Input string is not in row form.");
  22.    }
  23.  
  24.    b="";
  25.    bdum="";
  26.    for (i in 1:nc) {
  27.         sprintf(bdum,"%s",a[1;i]);
  28.         b=b+bdum;
  29.    }
  30.  
  31.    return b;
  32. };
  33.