# Version 1.2 of acs/ac-00204.txt

Unformatted version of acs/ac-00204.txt version 1.2
Other versions for file acs/ac-00204.txt

!standard G.3.1(24/2)          10-10-22 AC95-00204/01
!class confirmation 10-10-22
!subject Bad parameter name for Solve
!summary
!appendix
```
!topic Bad choice of parameter name for Solve (A : <matrix_type>; X : <vector/matrix_type>)
!from Gustaf Thorslund 10-07-16
!keywords numerics, parameter name, equations !discussion

I have been looking at Numerics packages in Ada05 and find the parameter name
'X' for Solve a bit confusing.

Usually 'X' is the unknown in an equation like A*x = b. Using those variable
names when calling Solve would result in:

A : Real_Matrix;
B, X : Real_Vector;

-- set A and B to something, then find X

X := Solve (A => A; X => B);

I have looked at 24/2 in:

The matrix notation with 'X' as unknown and A and b/B as known is the one I
learned at university and is also what is described at:

http://en.wikipedia.org/wiki/System_of_linear_equations#Matrix_equation

Was it intentional to use 'X' as parameter?

Is it possible to change the parameter name to for example 'B' instead?

***************************************************************

From: Randy Brukardt
Sent: Thursday, October 21, 2010  12:13 AM

Single character parameter names are almost always a mistake. (We just had a
lengthy discussion on this on the ARG mailing list in the context of another
AI.) Operators in Ada use "Left" and "Right" for a reason. But whether or not it
was intentional in this case is irrelevant at this point.

As you know, the parameter names of Ada subprograms are visible to Ada
programmers, and can be visible in calls via named notation. Changing the name
of the parameter would be incompatible with any existing code that uses the
current parameter name in named notation (as you did in your example). As such,
we would consider changing a parameter name in a predefined library it only in
extreme cases (and I don't think we've ever had one of these).

This is surely not an extreme case. So the answer to your second question is
"No".

***************************************************************
```

Questions? Ask the ACAA Technical Agent