Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

SICP driven MIRC SCRIPT coding

Name: Anonymous 2009-07-15 0:07

So I learned in SICP

You can add another layer of complexity to solve a problem.

So I had the problem of making a variable overwrite function for text files in mirc script.  I used my massive knowledge of SICP to come up with an easy and elegant solution

if ($1 == 0 ) {
/write -l0 C:\Ladder.txt $2
}
if ($1 == 1 ) {
/write -l1 C:\Ladder.txt $2
}
if ($1 == 2 ) {
/write -l2 C:\Ladder.txt $2
}
if ($1 == 3 ) {
/write -l3 C:\Ladder.txt $2
}
if ($1 == 4 ) {
/write -l4 C:\Ladder.txt $2
}
if ($1 == 5 ) {
/write -l5 C:\Ladder.txt $2
}
if ($1 == 6 ) {
/write -l6 C:\Ladder.txt $2
}
if ($1 == 7 ) {
/write -l7 C:\Ladder.txt $2
}
if ($1 == 8 ) {
/write -l8 C:\Ladder.txt $2
}
if ($1 == 9 ) {
/write -l9 C:\Ladder.txt $2
}
if ($1 == 10 ) {
/write -l10 C:\Ladder.txt $2
}
if ($1 == 11 ) {
/write -l11 C:\Ladder.txt $2
}
if ($1 == 12 ) {
/write -l12 C:\Ladder.txt $2
}

......

if ($1 == 1000 ) {
/write -l1000 C:\Ladder.txt $2
}

Name: =+=*=F=R=O=Z=E=N==V=O=I=D=*=+= !frozEn/KIg 2009-07-15 1:19

>>6  Its a Mirc script. Anything that describes the problem into [insert loop structure here] is equivalent to [repeat statement loop times]. Loops are only meant to save screen space.

________________________________
http://xs135.xs.to/xs135/09042/av922.jpg
Biology has progressed tremendously due to the model that Darwin put forth. But the black boxes Darwin accepted are now being opened, and our view of the world is again being shaken.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List