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

Renamed Scilab functions can't be called with zero arguments #9

Open
khumba opened this issue Aug 26, 2015 · 0 comments
Open

Renamed Scilab functions can't be called with zero arguments #9

khumba opened this issue Aug 26, 2015 · 0 comments

Comments

@khumba
Copy link
Owner

khumba commented Aug 26, 2015

Scilab supports the following syntax, which the Scilab renamer enables,

cgal.Point_2.new(4, 5);

where cgal and Point_2 are structs. Unfortunately, the Scilab parser has problems when no arguments are given,

cgal.Point_2.new();

giving the error:

 !--error 10000 
%st_e: Wrong value for input argument #1: not a valid field name.
at line      39 of function %st_e called by :  
cgal.Point_2.new()

For constructors, the non-renamed form can be used instead (new_Point_2()). For other functions this is more of a problem because they by default have short arbitrary top-level Scilab names. This shouldn't be a problem for non-static member functions, since they always take at least a this pointer. For other cases, we could add control over the intermediate top-level name (the renamer's member command supports this already).

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