1. no value returned from function
- Posted by Thomas May 21, 2012
- 1209 views
Commit 504025824dd6 g:/bitbucket/euphoria/include\std\machine.e:137 <0120>:: no value returned from function end function ^ std/machine.e 137 public function poke_long(atom address, object x) poke4( address, x ) end function
2. Re: no value returned from function
- Posted by ne1uno May 22, 2012
- 1171 views
reading between the lines of the error message, a function needs a return value and statement.
edit: I don't think all of the low level routines have full coverage yet.
3. Re: no value returned from function
- Posted by ChrisB (moderator) May 22, 2012
- 1101 views
Hi
A function should have the structure
function name(params) return something end function
you have to return something. You do not have to do anything with whatever is returned.
4. Re: no value returned from function
- Posted by DerekParnell (admin) May 22, 2012
- 1102 views
A function should ... have to return something.
While this is true, the bug being highlighted here is that this particular routine should have been a procedure and not a function.
5. Re: no value returned from function
- Posted by mattlewis (admin) May 22, 2012
- 1062 views
Commit 504025824dd6 g:/bitbucket/euphoria/include\std\machine.e:137 <0120>:: no value returned from function end function ^ std/machine.e 137 public function poke_long(atom address, object x) poke4( address, x ) end function
Whoops! Thanks for catching that. This was a compatibility function for 4.0 (poke_long is now a built in for 4.1). Fixed now in changeset 39242f3eafca.
edit: I don't think all of the low level routines have full coverage yet.
Actually, poke_long is tested, but as a built-in. The 4.0 compatibility version isn't. Those are there to make it possible to build a 4.1 from source using a 4.0 translator.
Matt