Hi -

On 11/23/15, 4:50 AM, "Tomsy Paul" <[email protected]> wrote:

>Hello all,
>
>
>var A: [1..m,1..n] real;
>
>
>Is there a way to get the range 1..m from A?
>
>
>I mean some proc of A like A.domain.first ?

Yes. A.domain.dim(1). Here is an example that I verified:

  var A: [1..10,1..20] real;
  writeln(A.domain.dim(1));



Note that this method is documented in the language specification
here:
 http://chapel.cray.com/spec/spec-0.98.pdf

in section 19.9.2. We've been working on moving content describing
library functions from the specification to the online documentation,
but some of it has not been moved yet.

The documentation here:
 http://chapel.cray.com/docs/latest/modules/internal/ChapelArray.html

covers the methods available on all domains but doesn't yet include
the methods available on Regular Domains.

Cheers,

-michael


------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to