home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / RADOOR30.ZIP / BBSEDIT.ZIP / BBSEDIT.DOC next >
Encoding:
Text File  |  1992-02-13  |  1.1 KB  |  44 lines

  1.  
  2.                               -=( BBS Editor )=-
  3.  
  4.  
  5. The BBS editor unit implements a simple online line editor. In it's simplest
  6. form it's very easy to use. Allocate a new buffer variable on the heap,
  7. pass it to the editor procedure and on return, do something with the text
  8. and dispose the buffer.
  9.  
  10. The strings and keys the editor uses are definable by the programmer. This
  11. is not only to make it more flexible, but also for the multilanguage support.
  12.  
  13. An example:
  14.  
  15.  
  16.  
  17. New(Body);
  18. If Body=Nil
  19.    Then Begin
  20.         Foss.WriteLnF('^1 Not enough memory!!^0');
  21.         Foss.CloseF;
  22.         Exit;
  23.         End;
  24.  
  25. FillChar(Body^,SizeOf(Body^),#00);
  26.  
  27.     { You can add text, quote from a message and such.. }
  28.  
  29. Lines:=2;
  30. Body^[0]:='* This is the BBSeditor demo:';
  31. Body^[1]:='';
  32.  
  33. LineEditor(Foss,Body,Lines,30); { 30 is the maximal number of lines.       }
  34.                                 { The maximum the editor can handle is 255 }
  35. Foss.WriteLnF('');
  36. If Lines=0
  37.    Then Foss.WriteLnF('Text aborted...')
  38.    Else Foss.WriteLnF('Text saved...');
  39.  
  40.     { Dispose the Editor buffer and free memory }
  41.  
  42. Dispose(Body);
  43.  
  44.