Source file writecpt.icn
############################################################################
#
#	File:     writecpt.icn
#
#	Subject:  Procedure to write a "carpet" file
#
#	Author:   Ralph E. Griswold
#
#	Date:     August 7, 1997
#
############################################################################
#
#   This file is in the public domain.
#
############################################################################
#
#  write_cpt(output, carpet) writes the carpet with heading information to
#  the specified file.
#
############################################################################
#
#  Links:  matrix
#
############################################################################

link matrix

procedure write_cpt(output, carpet)	#: convert matrix to numerical carpet
   local min, max, i, j, width, height

   width := matrix_width(carpet)
   height := matrix_height(carpet)

   write(output, "width=", width, " height=", height)

   write_matrix(output, carpet)

   return

end

This page produced by UniDoc on 2021/04/15 @ 23:59:44.