Passing variables to CALLs #202

Closed
opened 2026-02-20 10:15:14 -05:00 by deekerman · 1 comment
Owner

Originally created by @rogerl50 on GitHub (Apr 19, 2021).

The argument to a CALL must either be a literal or else passed as the contents of a variable whose name is agreed upon between caller and callee. The fact that there is no convenient way of getting a literal into a variable makes this difficult in the case where you wish to pass one of two literals depending on the results of an IF (say).

The best solution to this would be to allow applyVariables in the arguments list to a CALL. An alternative, which might be useful elsewhere, would be to provide a good way to get a literal value into a variable (or more generally moving the contents of a variable into a different variable).

Originally created by @rogerl50 on GitHub (Apr 19, 2021). The argument to a CALL must either be a literal or else passed as the contents of a variable whose name is agreed upon between caller and callee. The fact that there is no convenient way of getting a literal into a variable makes this difficult in the case where you wish to pass one of two literals depending on the results of an IF (say). The best solution to this would be to allow `applyVariables` in the `arguments` list to a CALL. An alternative, which might be useful elsewhere, would be to provide a good way to get a literal value into a variable (or more generally moving the contents of a variable into a different variable).
Author
Owner

@larkob commented on GitHub (Apr 20, 2021):

PR #307 is aiming to allow for an easier way to set variables

@larkob commented on GitHub (Apr 20, 2021): PR #307 is aiming to allow for an easier way to set variables
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/virtualtabletop#202
No description provided.