Memory access violation?

From: [at]} <Wojtek>
Date: Sat, 30 Jun 2001 21:52:26 -0400 (EDT)

Dominik Gruntz <gruntz{([at]})nowhere.xy

> > PROCEDURE Mult ( IN A, B : Matrix; VAR res : Matrix )
> >
> > or
> >
> > PROCEDURE Mult ( IN A, B : Matrix; OUT res : Matrix )
>
> but keep care not to call this procedure as Mult(A, B, A).
> Although the arguments are declared as IN, they are passed
> by reference! Writing to the result (A) means that you change
> the input matrix.

This looks awfully like a Fortran-like or C-like problem to me,
in the sense that "programmers should know what they are doing
or else anything can happen". I do not expect miracles even
in BlackBox, but should not this be flagged as a run time error
rather than change the input parameter against its declared use
as IN? In case the A and B were declared as VAR, then
no protection would be implied. However, IN gives a sense
of safety, which according to Dominik is violated. This should
not happen.

Note, that I have not tried this program myself. I am reacting
purely to what Dominik wrote. Excuse my comment in case his info
was not correct.


Wojtek Skulski skulski{([at]})nowhere.xy

--------------------------------------------

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the list owner at
   owner-blackbox{([at]})nowhere.xy
Received on Sun Jul 01 2001 - 01:52:26 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:27:43 UTC