1. Annoyed by "attempt to redefine" error

I have been using Euphoria for a couple of years now and really enjoy using it.

Today I have struck an error which seems illogical and suspect that either my version of Euphoria has become corrupted or I have just gone nuts.

The code I am having trouble with is this:-

function cleanUp(sequence page) 
atom junk, EOF, loc 
sequence first, second, Linkblock, links, line, stops, 
links = {} 
Linkblock = {} 
EOF = True 

When I run it I get an "attempt to redefine links" and a pointer to the instance where I am setting the links variable to an empty sequence.

links is only used in this function, I renamed it to lincs to test and got the same error.

I have commented the offending line out and I get "attempt to redefine Linkblock" and a pointer to the next line. Yes, if I comment out that line I get "attempt ot redefine EOF" and a pointer to that line.

All of these variables are only used in this function. This code was working in this format for the last few hours but now isn't.

I am running Windows XP in VirtualBox on a Linux computer. I am using Win32Lib IDE V1.0.0 and Win32Lib V0.60.6 with Euphoria V3.1

Any suggestions?

new topic     » topic index » view message » categorize

2. Re: Annoyed by "attempt to redefine" error

Sorry folks, nice first post. The answer is that I've gone nuts.

The error was of my own making, as per normal, an extra comma in the line declaring the variables as sequences.

Let that be a lesson to all programmers. It's too easy to miss the obvious.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Annoyed by "attempt to redefine" error

Hi

Yup, all been there and smoked that chicken, but, if you were using eu 4 then

function cleanUp(sequence page)  
atom junk, EOF = True, loc  
sequence first, second, line, stops,  
links = {},  
Linkblock = {}  
 


would be the way to init variables

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu