Working on some urinary bitwise junk in VB.
During the course of the day, I have jotted down several pages of notes.
I wrote the code, and made sure that it works properly.
A few minutes later, I have no idea how it works.
Some crucial nested logic in there.
A long time ago, when I was writing text adventures, something similiar happened.
For some reason I had to run a loop backwards in order for it work.
I couldn't tell you why, though.
At the time I understood it, but 1/2 hour later it was out of my head.
I just love melting my own brain.
During the course of the day, I have jotted down several pages of notes.
I wrote the code, and made sure that it works properly.
A few minutes later, I have no idea how it works.
Code:
a$ = Mid$(txtStage1.Text, i, 1)
x = Asc(a$)
b$ = Mid$(total2$, bs, 1)
y = x Or (Asc(a$) And (2 ^ j))
If (y And (2 ^ (j - 1))) > 0 Then
b$ = Chr(Asc(b$) Or Chr(Asc(255 And (2 ^ (bp - 1)))))
Mid(total2$, bs, 1) = b$
End If
Some crucial nested logic in there.
A long time ago, when I was writing text adventures, something similiar happened.
For some reason I had to run a loop backwards in order for it work.
I couldn't tell you why, though.
At the time I understood it, but 1/2 hour later it was out of my head.
I just love melting my own brain.