Re: call_func error message

new topic     » goto parent     » topic index » view thread      » older message » newer message

duke normandin wrote:
> 
> Hi all...
> 
> Why is Euphoria choking on the following code?
> 
> ..\code\test_split.exw:32
> Syntax error - expected to see possibly 'end', not a function
>               call_func(rtn, {some_list[i], d})
>                       ^
> 
> function foreach_split(sequence some_list, atom rtn, integer d)
>           for i=1 to length(some_list) do
>               call_func(rtn, {some_list[i], d})
>           end for
> end function
> 
> There's a few more lines of code, but it never gets parsed by the interpreter
> because of the choke-point above. Any ideas?
> 
> BTW, what a PITA not having a foreach routine!! TIA....
> --
> duke

A function needs a return statement. A procedure does not.

Yes, foreach has been discussed on the forum. I don't think it has been brought
up since the open sourcing of Euphoria.

--
"Any programming problem can be solved by adding a level of indirection."
--anonymous
"Any performance problem can be solved by removing a level of indirection."
--M. Haertel
"Premature optimization is the root of all evil in programming."
--C.A.R. Hoare
j.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu