|
Softpanorama |
May the source be with you, but remember the KISS principle ;-)
|
#define like {
#define man ;}
#define an ;
#define SayBro /*
#define CheckItOut */
SayBro like, this is some rad shit, so CheckItOut
like
a = b
an
c = d
man
SayBro , like who needs help from them compiler choads anyway?
THIS is the way to write CLEAR code. I mean really! CheckItOut
like SayBro this is ShellSort straight out of the white book, but in
a readable form.
CheckItOut man
#define YoDude for(
#define OK )
#define is =
#define AND &&
#define as
#define Do
#define long
#define some
#define make
#define shit
#define FAROUT
shell(v, n) SayBro sort v[0]...v[n-1] into increasing order CheckItOut
int v[], n;
like int gap, i, j, temp;
YoDude gap is n/2 an as long as gap > 0 Do some shit an make gap /=2 OK
YoDude i is gap an as long as i < n Do some shit an make i++ OK
YoDude j is i - gap an as long as j >= 0 AND v[j] > v[j+gap] Do some
shit an make j -= gap OK
like
temp is v[j] an
v[j] is v[j+gap] an
v[j+gap] is temp
man
FAROUT man
SayBro like, B there OB square! CheckItOut
Thanks to franklin a davis Thinking Machines Corp. Cambridge, MA 02142
617-876-1111 for putting it (again) on the net.
Copyright © 1996-2008 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.
Standard disclaimer: The statements, views and opinions presented on this web page are those of the author and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.
Created June 1, 1998; Last modified: February 28, 2008