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

Special characters as variable names #27

Open
mforets opened this issue May 19, 2018 · 6 comments
Open

Special characters as variable names #27

mforets opened this issue May 19, 2018 · 6 comments

Comments

@mforets
Copy link
Member

mforets commented May 19, 2018

If one of:

  • e
  • I

is detected in

H = readsxmodel(file)
H.ext[:variables]

then some special care should be taken. For example transforming to math expressions in convert.


For a unit test see this comment

@mforets mforets changed the title Special charcters in variable names Special characters as variable names May 19, 2018
@schillic
Copy link
Member

There might be more problematic cases. Maybe consider adding a prefix/suffix to all variable names (like _) as a preprocessing step.

@mforets
Copy link
Member Author

mforets commented May 22, 2018

whos(Base) gives the full list

@nikos-kekatos
Copy link
Collaborator

i like the idea of name_1

@nikos-kekatos
Copy link
Collaborator

similar to instantiation of base/network components in SpaceEx model editor

@mforets
Copy link
Member Author

mforets commented May 22, 2018

to check that there is a name issue we can do:

if any(vi  names(Base) for vi in variables)
    warn("conflict of a variable name and an existing name detected")
end

@schillic
Copy link
Member

It would be more helpful to output one of the variables vi that are conflicting.

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

3 participants