robert demaree


{ City } columbus
< Country > usa
* Profession * software engineer
User No # 125444
Total Questions Posted # 0
Total Answers Posted # 2

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 0
Users Marked my Answers as Wrong # 0
Questions / { robert demaree }
Questions Answers Category Views Company eMail




Answers / { robert demaree }

Question { 986 }

What is the difference between subscript and index?


Answer

Subscripts are programmer-defined variables, of numeric type--used to reference an array.
Example:
77 WS-SUB PIC 9(04) COMP.
01 WS-TABLE.
05 WS-TABLE-ENTRY OCCURS 5 Times PIC X(80).

In PROCEDURE DIVISION:
MOVE WS-TABLE-ENTRY(WS-SUB) TO...

Indexes are defined by the programmer, but the PICTURE clause is omitted.
Example:
01 WS-TABLE.
05 WS-TABLE-ENTRY OCCURS 5 TIMES INDEXED BY WS-IDX.
10 FILLER PIC X(80).

In PROCEDURE DIVISION:
MOVE WS-TABLE-ENTRY(WS-IDX) TO...

Is This Answer Correct ?    0 Yes 0 No

Question { 895 }

What do you understand by passing by reference and passing by content?


Answer

Passing by reference, is passing the ADDRESS of a variable--to a subprogram. The subprogram is able to change the value contained in the variable.

Passing by content is passing the DATA contained within a variable--to a subprogram. The subprogram can NOT change the value of the data in the (calling program's) variable.

Is This Answer Correct ?    0 Yes 0 No