What is the difference between Array of call by value and call by reference?
Any simple example?
Any simple example?
'ByRef set1 Sub firstval() x = 3 Call secondsub(x) [ x is now 9 here after return from secondsub] End Sub Sub secondsub(x) x = x + 6 End Sub '----------------------- 'ByVal set 2 Sub firstval2() x = 3 Call secondsub2(x) [ x is still 3 here after return from secondsub2] End Sub Sub secondsub2(ByVal x) x = x + 6 End Sub
struct s { int array[10] };
void func(struct s parameter);
...
struct s value;
...
func(value);
int array[10]; void func(const int *parameter); ... func(array);
Comment