home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 2.ddi / LANG.DI$ / GLOBAL.M < prev    next >
Encoding:
Text File  |  1993-03-07  |  862 b   |  22 lines

  1. %GLOBAL    Define global variables.
  2. %     GLOBAL X Y Z defines X, Y, and Z as global in scope.
  3. %
  4. %    Ordinarily, each MATLAB function, defined by an M-file, has its
  5. %    own local variables, which are separate from those of other functions,
  6. %    and from those of the base workspace and non-function scripts.
  7. %    However, if several functions, and possibly the base workspace,
  8. %    all declare a particular name as GLOBAL, then they all share
  9. %    a single copy of that variable.  Any assignment to that variable,
  10. %    in any function, is available to all the other functions declaring
  11. %    it GLOBAL.
  12. %
  13. %    Stylistically, global variables often have long names with all
  14. %    capital letters, but this is not required.
  15. %
  16. %    For an example, see the functions TIC and TOC.
  17. %
  18. %    See also ISGLOBAL, CLEAR, WHO.
  19.  
  20. %    Copyright (c) 1984-93 by The MathWorks, Inc.
  21. %    Built-in function.
  22.