Re: 'split' declared more than once

new topic     » goto parent     » topic index » view thread      » older message » newer message
rneu said...

I am getting error that the function 'split' is declared more than once:

<0074>:: Errors resolving the following references: 
    'split' (myfile.eu:182) has been declared more than once. 
        in /usr/share/euphoria/include/std/regex.e 
        in /usr/share/euphoria/include/std/sequence.e 

How can this be resolved if I have to use both regex.e and sequence.e ?

The solution is namespaces.

include std/regex.e as re 
include std/sequence.e as s 

you may choose any namespace identifier re, reg, blue, dog, ...

this lets you write re:split and s:split since they are now unique identifiers

I've been working on a rant about std/search.e, yes it is messy.

_tom

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

Search



Quick Links

User menu

Not signed in.

Misc Menu