unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* array? not working since long time
@ 2004-10-12 13:48 Roland Orre
  2004-10-19 17:23 ` Marius Vollmer
  0 siblings, 1 reply; 2+ messages in thread
From: Roland Orre @ 2004-10-12 13:48 UTC (permalink / raw)


The predicate (array? arg) hasn't been working for long time. 
E.g:
(array? 'hi)
#t
(array? '(list))
#t

The simple code below is what I use, but of course that is too simple
as it doesn't handle the optional prototype. The code in unif.c I don't
understand (that with smobs). Maybe also (array? "string") => #t

	Best regards
	Roland


SCM_PROC (s_array_p, "array?", 1, 0, 0, scm_array_p);

SCM scm_array_p( SCM what )
{
  if (SCM_IMP(what))
    return SCM_BOOL_F;
  else switch (SCM_TYP7(what))
    {
    case scm_tc7_fvect:
    case scm_tc7_svect:
    case scm_tc7_bvect:
    case scm_tc7_ivect:
    case scm_tc7_uvect:
    case scm_tc7_dvect:
    case scm_tc7_vector:
      return SCM_BOOL_T;
    }
  return SCM_BOOL_F;
} /* scm_array_p */





_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-10-19 17:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-12 13:48 array? not working since long time Roland Orre
2004-10-19 17:23 ` Marius Vollmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).