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

encode pattern for composing variables #14

Open
haraldschilly opened this issue Sep 8, 2018 · 0 comments
Open

encode pattern for composing variables #14

haraldschilly opened this issue Sep 8, 2018 · 0 comments

Comments

@haraldschilly
Copy link
Contributor

haraldschilly commented Sep 8, 2018

downstream sagemathinc/cocalc#3156

To make this language and template independent, this could be a list of strings and integers. Integer 0 is the "key" (variable name) and 1 is the value. The setup variables are a map of <key, value>. The strings are the fill-in for the respective programming language. Any processing then concatenates the strings without a space sign (thinking of bash!). e.g. [0, " = ", 1] for the "usual" case, [0, " := ", 1, ";"] for gap, ["setVar(", 0, ", ", 1, ");"] for a more unusual pattern.

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

No branches or pull requests

1 participant