jawadshaik Warnings : 1 New User
Joined: 27 Sep 2005 Posts: 16
|
|
|
|
Hi every one
I would like to clarify a doubt
(SUBSCRIPTRANGE):
CONT: PROC OPTIONS(MAIN);
DCL POINT ENTRY;
DCL I FIXED BIN(15) INIT(4);
DCL ARR(*) CHAR(1) CONTROLLED;
ALLOCATE ARR(4);
DO J = 1 TO I;
ARR(J) = 'J';
IF I = 2 THEN ARR(I) = 'L';
END;
CALL POINT(ARR,J);
END CONT;
(SUBSCRIPTRANGE):
POINT: PROC(ARR,I);
DCL ARR(*) CHAR(1);
DCL I FIXED BIN(15);
PUT SKIP LIST(I);
DO J = 1 TO I-1;
PUT SKIP LIST(ARR(J));
END;
END POINT;
Here I tried to pass an array which is dynamically allocated in cont to point
My doubt is that is there any difference between passing an array directly and passing pointer of an array (ignoring that the array in point cant be dynamic if pointer passed)
Hoping goood answer to clear my doubt |
|