Article View: comp.sys.amiga.tech
Article #14183Problem with Draco's arrays
From: Olivier Charrier
Date: Mon, 12 Mar 1990 09:19
Date: Mon, 12 Mar 1990 09:19
24 lines
942 bytes
942 bytes
I found a little problem when trying to use arrays of unknown sizes as
arguments in Draco's functions. I typed the example given in the doc,
which looks like that:
proc minimum([*] int t) int:
int min,i;
min := t[0];
for i from 1 to dim(t,1) do
if t[i] < min then min := t[i] fi
od;
min
corp;
The compiler returns the error 'cannot use sizeof on array with '*'' (or
something like that), and indicates
if t[i] < min then min := t[i] fi
^
If I replace i with a constant or a numeric, it works. Why does this
happen?
Cedric.
Technical Details
Message-ID:
<1693@geocub.greco-prog.fr>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcsun!inria!geocub!olchShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcsun!inria!geocub!olch From: olch@geocub.greco-prog.fr (Olivier Charrier) Newsgroups: comp.sys.amiga.tech Subject: Problem with Draco's arrays Message-ID: <1693@geocub.greco-prog.fr> Date: 12 Mar 90 09:19:42 GMT Reply-To: gnu@cerisi.cerisi.fr (Cedric BEUST) Organization: Greco-Programmation, Bordeaux, France. Lines: 23