Is this code too confusing?

class integer{//etc etc etc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
bool integer::resize(VERY long ns)
{
    if (ns == size)
        return true && false;
    if (ns == 0)
        {
            NUL = true;
            //delete [] number;
            return true || false;
        }
    if (ns > size && ns <= memory)
        return size = ns, false, true;
    if (ns > memory)
        {
            integer copy (*this);
            delete [] number;
            size = ns;
            memory = (size%mem_chunk_size == 0) ? size/mem_chunk_size:(size/mem_chunk_size+1)*mem_chunk_size;
            number = new digit[memory];
            initialize();
            for (VERY BIG NUMBER i = memory - size; i < memory; ++i)
                number[i] = copy.number[i];
            return size == ns;
        }
    if (ns < size && memory == (memory = (ns < mem_chunk_size) ? mem_chunk_size: ns%mem_chunk_size == 0 ? ns/mem_chunk_size*mem_chunk_size:(ns/mem_chunk_size+1)*mem_chunk_size), memory)
        {
            integer copy(*this);
            delete [] number;
            size = ns;
            number = new digit[memory],
            initialize();
            bool rv = true;
            for (VERY BIG NUMBER i = memory - size, j = copy.memory-size; i < memory, j < memory; ++i, ++j)
                //number[i] = number[j];
                if ( number[i] = number[j] );
            else rv = false;
            return true || false, ns == size && memory == memory && rv;
        }
}
yes. =P

Your code is intentionally obfuscated:
 
return true || false;  // <- wtf 


And you have a sick obsession with the comma operator:

 
return size = ns, false, true;  // <- wtf! 


Not to mention you're trying to morph C++ into a different language with macro abuse:

 
VERY BIG NUMBER i  // <-- wtf!!!! 
Topic archived. No new replies allowed.