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

TXTDB_WR

TXTDB_WR

Name


      TXTDB_WR

Purpose


      Write a file in txtdb format (columns) from a structure.

Category


Calling Sequence


      txtdb_wr, file, s

Inputs


      file = Name of text file to write. in
        If file is a null string no file is written.
      s = Structure with contents to write. in

Keyword Parameters


Keywords


        MAXLEN=mxlen Maximum line length for groups
          of columns (arrays). Def=80 characters.
        HEADER=hdr Optional array of text to write first in file.
        TRAILER=trl Optional array of text to write last in file.
        /NOSCALARS Force scalar items to use column output.
        /NONULL Write a space instead of <NULL> for null strings.
        OUT=txt Return result in a text array.
        /LIST list result to screen.
        /QUIET Do not print messages.
        ALIAS=new Array of new names to use for structure.
          If given must have one for each tag in structure.
        /PADTXT Pad text arrays so all elements are same length.
        TAGFORMATS=tgfm Formats for specified tags. Text array
          with 2 elements for each entry: tag name, format. Ex:
            TAGFORMATS=['ANG','(I3.3)','DIST','(F5.2)']
          The tag in structure s with the name ANG will be have
          format (I3.3) and the tag named DIST formatted (F5.2).
          The specified formats will override the defaults. This
          can make the output much more compact. Case is ignored.

Outputs


Common Blocks


Notes


      Notes: The output file is an ordinary text file
      and may be modified using a text editor. It is
      in a format that may be read back into a structure
      using txtdb_rd. Only scalars and 1-d arrays
      are written from the structure, arrays of 2 or
      more dimensions are ignored. Also only string
      and numeric data types are written, other data types
      are ignored (such as structures, pointers, objects).
      Complex data types are currently not handled, they
      could be added in a future version if needed.
      String arrays are considered text blocks if the string
      lengths vary within the array. If the lengths are constant
      over the array and the number of elements is the same
      as arrays adjacent in the structure then the string array
      will be grouped with other adjacent arrays having the same
      number of elements. Use /PADTXT to equalize lengths.

Modification History


      R. Sterner, 2008 Jan 03
      R. Sterner, 2008 Aug 15 --- Added optional header and trailer text.
      R. Sterner, 2008 Oct 28 --- Added /QUIET. Fixed long tag name problem.
      R. Sterner, 2008 Nov 20 --- Used tprint. To file, array, or screen.
      R. Sterner, 2008 Nov 20 --- Added ALIAS to allow renaming.
      R. Sterner, 2008 Nov 21 --- Added /PADTXT keyword.
      R. Sterner, 2009 Jan 11 --- Added /NONULL.
      R. Sterner, 2009 Jan 13 --- Added TAGFORMATS=tgfm.
      R. Sterner, 2009 Jan 14 --- Data type else (integers) now does formats.
      R. Sterner, 2009 Sep 10 --- Added /NOSCALARS.
  Copyright (C) 2008, 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.



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us