1. Annoyed by "attempt to redefine" error
- Posted by Burtm10 Aug 26, 2010
- 1010 views
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?
2. Re: Annoyed by "attempt to redefine" error
- Posted by Burtm10 Aug 26, 2010
- 974 views
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.
3. Re: Annoyed by "attempt to redefine" error
- Posted by ChrisB (moderator) Aug 26, 2010
- 1104 views
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