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

Unable to get or modificate fields of types #20

Open
NexSqaud opened this issue Aug 20, 2021 · 1 comment
Open

Unable to get or modificate fields of types #20

NexSqaud opened this issue Aug 20, 2021 · 1 comment

Comments

@NexSqaud
Copy link

There unable to get or modificate fields of embedded types.
For example, complex numbers:
Screenshot_2230
Error: "Name contains an invalid character"

@a-a-maly
Copy link
Owner

That is right, currently there is no support in Kumir for structure fields, neither for user-defined structures nor for internal ones.
And the "Комплексные числа" type is very experimental.
We can initialize a variable with "компл z = 5+3.7i", set a new value with "z := 13-6.8i", or get its parts via Re(z) and Im(z). But currently we can not modify the real or imaginary part separately. There probably should be some functions like SetRe(z, x) and SetIm(z, y). As well as functions to conjugate a number, to calculate its Euclidean norm and angle, and, ideally, all the good functions to work with complex numbers: trigonometric and hyperbolic (with inverses), gamma and its relatives, Bessel's and so on. But currently we implemented only a very limited subset.

By the way, we can see a Kumir crash if we write "Im(z) := 4.2" and leave that line.
This bug should be of rather high priority.

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

2 participants