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

string support #32

Open
ghost opened this issue Aug 17, 2018 · 3 comments
Open

string support #32

ghost opened this issue Aug 17, 2018 · 3 comments

Comments

@ghost
Copy link

ghost commented Aug 17, 2018

support for string variables, comparison and evaluation. Example:

if(var_1=='A', 'Match', 'No Match')

@pieterderycke
Copy link
Owner

I could look for support in Jace 1.0. Currently I first plan to release a 0.9.1 increasing the number of out of the box provided functions drastically.

@Mortana89
Copy link

Would it be difficult to enhance the function registry to accept strings as positional parameters?
That would make it possible using something like expression = myFunction('param1string', 'param2string', 3.0).
Currently the function registry only accepts passing doubles :(

@timjen3
Copy link

timjen3 commented Nov 17, 2022

It would be handy to use string parameters for derived attributes. For example:

skill = 10;
hp = 6;
difficulty = "hp * 2";

_engine.Calculate("difficulty <= skill");  // result is 0 since 12 > 10

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

3 participants