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

Allow semicolon ";" at the end #53

Open
linwaytin opened this issue Sep 25, 2020 · 0 comments
Open

Allow semicolon ";" at the end #53

linwaytin opened this issue Sep 25, 2020 · 0 comments

Comments

@linwaytin
Copy link

First, thank you for this fantastic package.
Maxima is a great symbolic algebra system and it's nice that julia can interact with it.

For now the expression from julia side does not allow semicolon ";" at the end.
For example, mcall(m"1+2;") will return error.
Although mcall(m"1+2") is natural, multi-line expressions like

mcall(m"
1+2;
3*4
")

seem weird.

I think the problem is related to the split function in mexpr.jl.
In particular, I found

mex = MExpr("1+2;3^4")
split(mex).str 
#2-element Array{String,1}:
# "1+2"
# "1+2"

The following seems strange to me.

Maxima.jl/src/mexpr.jl

Lines 136 to 138 in 7be4dbd

for j in 1:length(p)
push!(n, p[i])
end

I am wondering if it should be p[j] instead of p[i].

@linwaytin linwaytin mentioned this issue Sep 26, 2020
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