Print

Print


>     Here is a simple example in which I declare an array, DATA(-1:3).
> When I pass
> it to a subroutine, the indexes are changed to 1 to 5.  Is this a bug in
> the compiler or in the language specification? Using pointer can
> preserve the range of the index. However, I am implementing a library
> and I don't want to impose an extra burden on user to declare the data
> using pointer whenever they use the library. Any other solutions?

Use UBOUND and LBOUND to access the bounds (1:n)
in the subroutine.

> Your
> comments and suggestions will be greatly appreciated. Thanks.
>
> Regards,
> David Wong




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%