Re: [BLACKBOX] Matrix slices - syntax

From: Douglas G. Danforth <"Douglas>
Date: Wed, 31 Mar 2010 23:22:46 -0700

----boundary-LibPST-iamunique-256865737_-_- Content-type: text/plain Thanks Aubrey. Not sure I like it but thanks. I have adopted the strategy that all procedures that accept vectors or matrices specify their arguments for general forms (i.e. VDesc and MDesc) even when they only want a restricted subset. I let the module context enforce the preconditions. -Doug Aubrey McIntosh wrote: Try this: MODULE PrivTest2; TYPE VDesc = ARRAY OF REAL; V3Desc = ARRAY 3 OF REAL; MDesc = ARRAY OF ARRAY OF REAL; M3Desc = ARRAY 3,3 OF REAL; MTubeDesc = ARRAY 3 OF V3Desc; PROCEDURE Q (IN v: VDesc); BEGIN END Q; PROCEDURE Q3 (IN v: V3Desc); BEGIN END Q3; PROCEDURE Test; VAR mt : MTubeDesc; BEGIN Q(mt[0]); (* works *) Q3 (mt[0]) (*also works*) END Test; END PrivTest2. On Wed, Mar 31, 2010 at 9:23 PM, Douglas G. Danforth Received on Thu Apr 01 2010 - 08:22:46 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:34 UTC