string.pas
上传用户:upcnvip
上传日期:2007-01-06
资源大小:474k
文件大小:2k
源码类别:

编译器/解释器

开发平台:

C/C++

  1. { Oregon Software Pascal dynamic string package. }
  2. {*VarFiles=0}  {INTF-ONLY}
  3. function Len(var s : array [lo..hi:integer] of char) : integer; external;
  4. {FuncMacro Len(lo,hi,s) = strlen(s)}
  5. procedure Clear(var s : array [lo..hi:integer] of char); external;
  6. {FuncMacro Clear(lo,hi,s) = (s[lo] = 0)}
  7. procedure ReadString(var f : text;
  8.      var s : array [lo..hi:integer] of char); external;
  9. {FuncMacro ReadString(f,lo,hi,s) = fgets(s, hi-lo+1, f)}
  10. procedure WriteString(var f : text;
  11.       var s : array [lo..hi:integer] of char); external;
  12. {FuncMacro WriteString(f,lo,hi,s) = fprintf(f, "%s", s)}
  13. procedure Concatenate(var d : array [lod..hid:integer] of char;
  14.       var s : array [los..his:integer] of char); external;
  15. {FuncMacro Concatenate(lod,hid,d,los,his,s) = strcat(d, s)}
  16. function Search(var s : array [lo..hi:integer] of char;
  17. var s2 : array [lo2..hi2:integer] of char;
  18. i : integer) : integer; external;
  19. {FuncMacro Search(lo,hi,s,lo2,hi2,s2,i) = strpos2(s,s2,i-lo)+lo}
  20. procedure Insert(var d : array [lod..hid:integer] of char;
  21.  var s : array [los..his:integer] of char;
  22.  i : integer); external;
  23. {FuncMacro Insert(lod,hid,d,los,his,s,i) = strinsert(s,d,i-lod)}
  24. procedure Assign(var d : array [lo..hi:integer] of char;
  25.  var s : array [los..his:integer] of char); external;
  26. {FuncMacro Assign(lo,hi,d,los,his,s) = strcpy(d,s)}
  27. procedure AssChar(var d : array [lo..hi:integer] of char;
  28.   c : char); external;
  29. {FuncMacro AssChar(lo,hi,d,c) = sprintf(d, "%c", c)}
  30. function Equal(var s1 : array [lo1..hi1:integer] of char;
  31.        var s2 : array [lo2..hi2:integer] of char) : boolean; external;
  32. {FuncMacro Equal(lo1,hi1,s1,lo2,hi2,s2) = !strcmp(s1,s2)}
  33. procedure DelString(var s; i, j : integer); external;
  34. procedure SubString(var d; var s; i, j : integer); external;