home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / packer / arc / arctool / teststac.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1988-09-29  |  1.4 KB  |  56 lines

  1. {
  2.                        F i l e    I n f o r m a t i o n
  3.  
  4. * DESCRIPTION
  5. A simple program to test StackUse. Uses a few string because strings are
  6. rather hard on the stack.
  7.  
  8. * ASSOCIATED FILES
  9. STACKUSE.PAS
  10. TESTSTAC.PAS
  11.  
  12. }
  13.  
  14. {**********************************************************
  15.  
  16.   A simple program to test the public domain unit
  17.   StackUse.  Uses a few strings because strings are
  18.   rather hard on the stack.
  19.  
  20.   version 1.0
  21.   7/17/88
  22.   by Richard S. Sadowsky
  23.   released to the public domain
  24.  
  25. **********************************************************}
  26.  
  27. {$M 4096,0,0} { allocate a 4k stack.  This is 1/4 the default stack }
  28.               { size.  NOTE: this program uses over half of the 4K  }
  29.               { stack we give it! }
  30.  
  31. program TestStackUsage;
  32.  
  33. uses StackUse;
  34. { NOTE: all we do is Use StackUse, and it takes care of everything! }
  35.  
  36.  
  37. function UseStrings(S1,S2,S3,S4,S5,S6 : String) : String;
  38.  
  39. { this function is designed to use some stack }
  40.  
  41. begin
  42.   UseStrings := S1 + S2 + S3 + S4 + S5 + S6;
  43. end;
  44.  
  45. begin
  46.  
  47.   WriteLn('UseStrings = ',UseStrings('string #1 ',
  48.                                      'string #2 ',
  49.                                      'string #3 ',
  50.                                      'string #4 ',
  51.                                      'string #5 ',
  52.                                      'string #6'));
  53.   WriteLn
  54. end.
  55. 
  56.