home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TP_ADV.ZIP / LIST0203.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1989-07-31  |  1.0 KB  |  24 lines

  1. Program EvaluateDemo;
  2. { A simple example program that will show how to use the  }
  3. { evaluate option of the debugger to change the value of  }
  4. { a variable, and evaluate a function contained in the    }
  5. { System Unit.                                            }
  6. Uses Crt;                   { Link in the CRT unit        }
  7.  
  8. Var
  9.   SCopy,                    { Define string vars for demo }
  10.   S : String;
  11.   I : Integer;              { Loop control variable       }
  12.  
  13. Begin
  14.   ClrScr;                   { Clear the output screen     }
  15.   S := 'This is a test string that contains text';
  16.                             { Initialize string for demo  }
  17.   For I := 0 to Length( S ) Do
  18.     SCopy[I] := S[I];       { Simple copy routine         }
  19.   Writeln( 'S = ', S );     { Output the string to screen }
  20.   For I := 1 to Length( SCopy ) Do
  21.                             { Output the copy to screen   }
  22.     Write( SCopy[I] );      { Here is where we'll modify  }
  23. End.                        { the Loop Control Variable   }
  24.