Discussion:
Array parameters
(too old to reply)
Jason Luu
2004-07-01 20:24:34 UTC
Permalink
When declaring a procedure parameter to accept arrays, does the array size
need to be specified? For example:

int total (int A[])
begin
# code
end;

int total (int A[10])
begin
# code
end;

Which of the above are acceptable? Or are both acceptable?
Nguyen Nguyen
2004-07-01 21:38:07 UTC
Permalink
No, the array size is not (and cannot be) specified for array parameters.
See the sample program total.sl.

Nguyen
Post by Jason Luu
When declaring a procedure parameter to accept arrays, does the array size
int total (int A[])
begin
# code
end;
int total (int A[10])
begin
# code
end;
Which of the above are acceptable? Or are both acceptable?
Continue reading on narkive:
Loading...