TAL Reference Manual
Statements
TAL Reference Manual—526371-001
12-31
RETURN Statement
3. This example copies three occurrences of one structure to another:
LITERAL copies = 3; !Number of occurrences
STRUCT .s[0:copies - 1]; !Source structure
BEGIN
INT a, b, c;
END;
STRUCT .d (s) [0:copies - 1]; !Destination structure
PROC p;
BEGIN
d ':=' s FOR copies ELEMENTS;!Word move of three
END; ! structure occurrences
4. This example copies three occurrences of a substructure:
LITERAL copies = 3; !Number of occurrences
STRUCT .s;
BEGIN
STRUCT s_sub[0:copies - 1]; !Source substructure
BEGIN
INT a, b;
END;
END;
STRUCT .d (s); !Destination substructure
! is within structure D
PROC p;
BEGIN
d.s_sub ':=' s.s_sub FOR copies ELEMENTS;
END; !Byte move of three
! substructure occurrences
For more examples, see sections 7 and 8 in the TAL Programmer’s Guide.
RETURN Statement
The RETURN statement returns control to the caller. If the called procedure or
subprocedure is a function, RETURN must return a result expression.
The RETURN statement can also return a program-specified condition code value.
RETURN
RETURN
,
cc-expression
result-expression
, cc-expression
VST1218.vsd