Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add expression to concatenate strings #246

Open
vmorilla opened this issue Oct 20, 2024 · 0 comments
Open

Add expression to concatenate strings #246

vmorilla opened this issue Oct 20, 2024 · 0 comments

Comments

@vmorilla
Copy link

vmorilla commented Oct 20, 2024

sjasmplus does not seem to allow expressions involving strings, more specifically, the concatenation.

In my case, I am trying to produce output files with a different name that depend on an environment variable to control some localization outputs. So far, I am doing something like this:

        DEFINE LANG 1
        IF LANG = 1
            DEFINE SNAFILE "build/zx_en.sna"
            DEFINE TAPFILE "build/zx_en.tap"
        ELSE
            IF LANG = 2
                DEFINE SNAFILE "build/zx_fr.sna"
                DEFINE TAPFILE "build/zx_fr.tap"
            ELSE
                DEFINE SNAFILE "build/zx_es.sna"
                DEFINE TAPFILE "build/zx_es.tap"
            ENDIF
        ENDIF 

which is quite cumbersome. Rather than that, I would like to do something like this:

Suggested solution:

        DEFINE LANG "ES"
        DEFINE SNAFILE "build/zx_" + LANG +  ".sna"
        DEFINE TAPFILE "build/zx_" + LANG + ".tap"

where '+' (or any alternative operator) produces the concatenation of two strings.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant