For the new design, if a multiple string assignment contains at least one sub-string, then there will be a specific assign code for each assignment instead of a single assign list code. The specific assign codes will keep the value being assigned on the stack for the next assign code. Only the last code will be a regular assign code. Consider this mixed string assignment and its translation (note color coding showing the tokens that the codes process):
A$, LEFT$(B$,5), RIGHT$(C$,2) = D$The assign keep codes will pop the value to be assigned from the stack, pop the reference to assign, assign the value to the reference and push the value back to the stack for the next assign code. The final regular assign code will not push the value to be assigned back to the stack leaving the stack empty.
A$ B$ 5 C$ 2 D$ AssignKeepRight AssignKeepLeft AssignStr
There will be five assign keep codes: AssignKeepStr, AssignKeepLeft, AssignKeepMid2, AssignKeepMid3 and AssignKeepRight. In the table, these codes will be the second associated code for the AssignStr, Left, Mid2, Mid3 and Right code entries.
No comments:
Post a Comment
All comments and feedback welcomed, whether positive or negative.
(Anonymous comments are allowed, but comments with URL links or unrelated comments will be removed.)