Can I put a variable in a *label name?

I’m having trouble with recreating a module over and over that includes a series of *labels.

The error I’m getting is: Since the *labels are being repeated with the same names the file can’t work. But having to change the labels every time I reuse the module is onerous. I am thinking of just naming then all with a number, to make it easier to advance the number manually each time. But I wondered if I could put a variable (based on the unique name of that implementation of the variable) into the *label name so that I wouldn’t have to change them all each time.

Thoughts?

Short answer is no, you can’t use a variable in the *label command.

But you shouldn’t need to. Would you be able to give an example of what you’re trying to accomplish?

I expect whatever you’re trying to do can be done with *params and *gosub (or *gosub {label_name}).

2 Likes

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.