>  Docs Center  >  Libraries  >  JHU/APL/S1R  >  TPRINT






      Turn print statements into a text array.


Calling Sequence



      a1,a2,a3,... = args to tprint. in
        May have up to 20.

Keyword Parameters


        BUFFER=buf Set up and use an external buffer, buf instead
          of internal buffer. Use BUFFER=buf on each call to
          tprint. Will create and return it on /INIT, then
          send as an input on following calls.
        /INIT Clear internal text array.
          May also give an initial text array: INIT=txt.
        ADD=txt Add given text array to internal text.
        OUT=txt Return internal text array.
        /PRINT print the entire internal text array to screen.
        /NUMBERS Include text line indices for the /PRINT option.
        /SCREEN Print the added line or lines to the screen also.
        SAVE=file Save internal text array in a text file.
        /QUIET do not show messages.
        /REVERSE reverse text array order (for /PRINT, OUT=, or SAVE=).
        FORMAT=fmt Optional print format.
        ERROR=err 0=ok, 1=error if OUT or /PRINT used with no text.


Common Blocks



      Notes: Intended to make it easy to take a set of print
        statements in a program and change them to build up
        a text array. Uses the IDL string function in place
        of the print statement to handle the arguments. Can
        then return the text array built up from multiple
        tprint calls and use it elsewhere.

Modification History

      R. Sterner, 2000 Aug 17
      R. Sterner, 2001 Mar 21 --- Added /REVERSE flag.
      R. Sterner, 2001 May 25 --- Allowed INIT=txt to start with text.
      R. Sterner, 2001 May 25 --- Added new keyword: ADD=txt to add text.
      R. Sterner, 2001 May 30 --- Added new keyword: SAVE=file to save text.
      R. Sterner, 2004 May 20 --- Dropped execute to allow in IDL VM.
      R. Sterner, 2006 Apr 26 --- Added BUFFER=buf keyword.
      R. Sterner, 2006 May 17 --- Fixed BUFFER=buf for ADD and OUT.
      R. Sterner, 2006 Jul 14 --- Fixed the /PRINT command.
      R. Sterner, 2008 Nov 20 --- Added /QUIET.
      R. Sterner, 2009 Jan 09 --- Added optional FORMAT and allowed 20 args.
      R. Sterner, 2009 May 05 --- Added /SCREEN keyword.
      R. Sterner, 2009 May 05 --- Added /NUMBERS keyword to use with /PRINT.
      R. Sterner, 2010 Jan 05 --- Made loop limit long for /save and /print.
      R. Sterner, 2010 Jan 05 --- Added /verbose.
      R. Sterner, 2010 May 03 --- Converted arrays from () to [].
  Copyright (C) 2000, Johns Hopkins University/Applied Physics Laboratory
  This software may be used, copied, or redistributed as long as it is not
  sold and this copyright notice is reproduced on each copy made. This
  routine is provided as is without any express or implied warranties
  whatsoever. Other limitations apply as described in the file disclaimer.txt.

© 2020 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us