home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / TURBOPAS / TURBOSCR.ZIP / STRINGOF.PAS next >
Encoding:
Pascal/Delphi Source File  |  1985-12-31  |  959 b   |  30 lines

  1.    Type
  2.      String255 =  String[255];
  3.    {$V-}   { Relax String Length Checking. }
  4.  
  5.  {  **********************************************************************
  6.     ***                            StringOf                            ***
  7.     ***-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=***
  8.     *** This function returns a string of the character represented by ***
  9.     *** ASCIINUM repeated NUM times.  This is similar to BASIC's STRING***
  10.     *** function.                                                      ***
  11.     **********************************************************************  }
  12.  
  13.     Function StringOf(ASCIINum,Num: Byte): String255;
  14.  
  15.          Var
  16.            Str: String255;
  17.            StrLen: Byte absolute Str;
  18.            S: Byte;
  19.  
  20.          Begin
  21.  
  22.             StrLen := Num;
  23.  
  24.             For S := 1 to Num Do
  25.               Str[S] := Chr(ASCIINum);
  26.  
  27.             StringOf := Str;
  28.  
  29.          End;
  30.