1. routine_id and different files
- Posted by kobi May 03, 2012
- 1093 views
I have a few include files, and wanted to use routine_id from an included function.
when I pass the function name, as an argument, it doesn't work.
it only works when both the inner function and the "immediate" one are in the same namespace, (or same file?)
Is that a bug, or expected behaviour?
include seqops.e function inc(integer num) return num+1 end function ? map({1,2,3},"inc") -- works only when map is in the same file. map uses routine_id.
Thanks, kobi
2. Re: routine_id and different files
- Posted by DerekParnell (admin) May 03, 2012
- 1196 views
I have a few include files, and wanted to use routine_id from an included function.
when I pass the function name, as an argument, it doesn't work.
it only works when both the inner function and the "immediate" one are in the same namespace, (or same file?)
Is that a bug, or expected behaviour?
This is expected.
As the inc() function does not have a scope qualifier, it can only been seen by code in the same file. Try using the public scope qualifier instead ...
include seqops.e public function inc(integer num) return num+1 end function ? map({1,2,3},"inc")
3. Re: routine_id and different files
- Posted by kobi May 04, 2012
- 1059 views
OH ! ! access levels.
I was just being dense...
it all works perfectly then, sorry for the distraction