Re: call_func error message

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

duke normandin wrote:
> 
> Jason Gade wrote:
> > 
> > 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
> > > 
> > > snip
> > 
> > A function needs a return statement. A procedure does not.
> 
> Yey! My bad! I left out a line when I copying my code ;) However, the
> choke-point occurs before where the return statement ought to be. Must
> be something else irritating the interpreter! Thanks...
> --
> duke

Hi Duke, welcome to EU.

In case you haven't guessed yet, Jason was pointing out that your call_func() is
a function (as well as the foreach_split() routine) so needs somewhere to stash
whatever it is returning i.e. Var = call_func(...

Regards PeteS

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

Search



Quick Links

User menu

Not signed in.

Misc Menu