Newsgroups: comp.lang.apl
Path: watmath!watserv2.uwaterloo.ca!torn!cs.utexas.edu!sdd.hp.com!usc!rpi!ghost.dsi.unimi.it!univ-lyon1.fr!chx400!bernina!hoesel
From: hoesel@igc.ethz.ch (Frans van Hoesel)
Subject: what about func(a,a,a)
Message-ID: <1992Dec3.120841.9774@bernina.ethz.ch>
Sender: news@bernina.ethz.ch (USENET News System)
Organization: Computational Chemistry, ETH, Zuerich
Date: Thu, 3 Dec 1992 12:08:41 GMT
Lines: 30

Hi,

This question has more to do with array processing, than with  apl
but readers of this news group are propably the most experienced
in thinking-in-arrays.

So I'm writing another language that does array processing (don't blame
me for that please). Suppose that a user write a function myfunc
int[] myfunc(int a[], int b[])
the function is expected to work with 1D arrays. If it is called
with a 2D array, then the compiler will generate an implied loop
repeatedly calling the function with all the rows in the
2D array. What must happen if I call the function with both arguments
being a 2D array?
Should one expect  a loop over a loop, or just one loop running in
parallel over both the arguments?, what if the shape of the arrays
isn't the same?
How do problems arise when going to even more than two arguments.

Preferable I want to think of scalars as being a zero-dimensional
array, so I can make a 'simple' rule handling everything as being
arrays. (or must I think of scalars as 1D arrays with size 1, or
2D arrays with size (1,1))

well, I did not make up my mind yet, so any comment is very much 
appreciated!
-- 
      ================================================================
      ===  frans van hoesel               hoesel@igc.ethz.ch       ===
      ================================================================
