/* Copyright (C) 1995,1996,1997,1998,2000,2001,2002,2003,2004,2005,
- * 2006, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
+ * 2006, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Free Software Foundation,
+ * Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
scm_array_get_handle (array, &h);
scm_putc_unlocked ('#', port);
- if (h.ndims != 1 || h.dims[0].lbnd != 0)
+ if (SCM_I_ARRAYP (array))
scm_intprint (h.ndims, 10, port);
if (h.element_type != SCM_ARRAY_ELEMENT_TYPE_SCM)
scm_write (scm_array_handle_element_type (&h), port);
;;;; arrays.test --- tests guile's uniform arrays -*- scheme -*-
;;;;
-;;;; Copyright 2004, 2006, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
+;;;; Copyright 2004, 2006, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Free
+;;;; Software Foundation, Inc.
;;;;
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
#u32(2 3)))
(pass-if (equal? (array-ref (array-row #2u32((0 1) (2 3)) 1) 0)
2)))
+
+;;;
+;;; printing arrays
+;;;
+
+(with-test-prefix/c&e "printing arrays"
+ (pass-if-equal "writing 1D arrays that aren't vectors"
+ "#1(b c)"
+ (format #f "~a" (make-shared-array #(a b c)
+ (lambda (i) (list (+ i 1)))
+ 2))))