Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!pipex!uunet!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!conway
From: conway@munta.cs.mu.OZ.AU (Thomas Charles CONWAY)
Subject: Re: Array
Message-ID: <9501616.21726@mulga.cs.mu.OZ.AU>
Sender: news@cs.mu.OZ.AU (-)
Organization: Computer Science, University of Melbourne, Australia
References: <3f63luINN8rb@sbusol.rz.uni-sb.de> <9501613.16820@mulga.cs.mu.OZ.AU>
Date: Mon, 16 Jan 1995 05:42:02 GMT
Lines: 23

fjh@munta.cs.mu.OZ.AU (Fergus Henderson) writes:

>pi301-1@htw.uni-sb.de (Student 3.Stj ) writes:
>
>>i want to write an procedure arraydim(M,Z,S) whitch thell me if M is an array and if it is
>>one put the dimension into Z and S.
>>
>>Can anybody help me ?
>
>Sure, no problem.  Here's a solution for standard Prolog:
>
>	array_dim(_, _, _) :- fail.
>
>Standard Prolog doesn't have arrays ;-)
>

But if your application fits the right constraints, arg and functor
can be used for *constant*time* access data structures.

Thomas
-- 
Thomas Conway                                           conway@cs.mu.oz.au
AD DEUM ET VINUM
