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

if script include a function, will throw out error #17

Open
zj2050 opened this issue Feb 6, 2023 · 7 comments
Open

if script include a function, will throw out error #17

zj2050 opened this issue Feb 6, 2023 · 7 comments

Comments

@zj2050
Copy link

zj2050 commented Feb 6, 2023

Hi,all:
I have defined a function in script, like:
disp("Running...") function result = myrand(n, t, p, d) a = 200 * t + p; big_rand = a * n; result = big_rand / 10**d; return;endfunction mrand = myrand(5379, 0, 91, 4)

the script can correct execute in octave, but when call:
octave.Execute(script)
will show error : "error: 'myrand' undefined near line 1, column 9\r\n"

how defined a function in script? thanks

@zj2050
Copy link
Author

zj2050 commented Feb 6, 2023

@triforcely please give any suggestion? thanks

@zj2050
Copy link
Author

zj2050 commented Feb 6, 2023

script = string.Format("disp("Running...")\n "+
"function result = myrand(n, t, p, d) a = 200 * t + p; big_rand = a * n; result = big_rand / 10**d; return;endfunction \n"+
"mrand = myrand(5379, 0, 91, 4) "));

this code phrase from octave

@triforcely
Copy link
Owner

Hey @zj2050 . This seems to be a bug. I've reproduced it and internal response parsing logic causes Octave.NET to freeze when handling functions. I'll work on a fix, thanks for the report.

@zj2050
Copy link
Author

zj2050 commented Feb 7, 2023

Hey @zj2050 . This seems to be a bug. I've reproduced it and internal response parsing logic causes Octave.NET to freeze when handling functions. I'll work on a fix, thanks for the report.

Hi @triforcely thanks for great work, then fixed please @

@Jacks321
Copy link

Jacks321 commented Feb 8, 2023

Hi! I'm having the same problem too, I've been trying for days. Thanks in advance for the correction @triforcely !

@triforcely
Copy link
Owner

I started looking into this issue and it doesn't seem to be very easy to fix. I don't have too much time to fix it at the moment, so feel free to look into it yourself, I'll be happy to merge your changes.

@zj2050
Copy link
Author

zj2050 commented Feb 13, 2023

@triforcely @CptWesley

o

It's a very bad news

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