Create a two-dimensional array at runtime: Difference between revisions
Content added Content deleted
m (mass lang tag) |
m (→{{header|Common Lisp}}: lang tag) |
||
Line 147:
=={{header|Common Lisp}}==
(d2 (read)))
(assert (and (typep d1 '(integer 1))
Line 156:
(p2 (floor d2 2)))
(setf (aref array p1 p2) t)
(print (aref array p1 p2))))</lang>
The <tt>[http://www.lispworks.com/documentation/HyperSpec/Body/m_assert.htm assert]</tt> will allow the user to reenter the dimensions if they are not positive integers.
|