[Show all top banners]

login
Replies to this thread:

More by login
What people are reading
Subscribers
:: Subscribe
Back to: Kurakani General Refresh page to view new replies
 LZ77 Help!
[VIEWED 6623 TIMES]
SAVE! for ease of future access.
Posted on 11-08-04 3:37 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Folks, this is my code for LZ77. I can't seem to find what the problem is. Can anyone help me out here? Any programmers at sajha? Has anyone had to code LZ77 before? I tell ya, it's a pain in the butt!

Hers is my compression code: I still have to work on my decompression routine. Thanks for any help guys!
Peace!
-LoGiN
*************************************************************
#include
#include
#include


/**************************************************************/
int SW, swb, LA, lab, minsearch, offset, length, inamount;
int lastrun, lastbits, alreadyin;
FILE *fin,*fout;
char *swbegin, *swend, *labegin, *bigbuf,*endfile;
int curroffset = 0;
unsigned char currbyte;

int pow(int x, int z)
{
int y;
int w = 1;
for(y=1;y<=z;y++)w*=x;
return w;
}
/*************************************************************/void ByteIntoBits(unsigned char inchar, int start, int len)
{
unsigned char mask;
int templen, j;
if (curroffset + len > 8){
templen = 8 - curroffset;
ByteIntoBits(inchar, start, templen);
ByteIntoBits(inchar, start + templen, len - templen);
return;
}
mask = (unsigned char)(pow(2, len) - 1);
if ((j = 8-start-len) > 0) mask <<= j;
mask &= inchar;
if (curroffset < start) mask <<= start - curroffset;
if (curroffset > start) mask >>= curroffset - start;
currbyte |= mask;
curroffset += len;
if (curroffset > 7) {
curroffset -= 8;
fwrite(&currbyte, 1, 1, fout);
currbyte = 0;
}}
/***************************************************************/
int Findbiggest()
{

while(length>minsearch){
while(swbegin<=swend - length){
if(!strncmp(swend, swbegin, length)){
offset = swend - swbegin;
return 1;}
else swbegin++;}
length--;
swbegin = swend - SW;
}
return 0;}
/***************************************************************/
int Code(){
int data = 1;
unsigned char *ptr;
printf("Code -- offset = %d length = %d\n", offset, length);
ByteIntoBits((unsigned char)data,7,1);
ptr=(unsigned char *)&offset;
offset--;
if(swb<=8) ByteIntoBits(*ptr,8-swb,swb);
else{
ByteIntoBits(*ptr,0,8);
ptr++;
}offset++;
ptr =(unsigned char *)&length;
length--;
if(lab<=8) ByteIntoBits(*ptr,8-lab,lab);
else{
ByteIntoBits(*ptr,0,8);
ptr++;
ByteIntoBits(*ptr,16-lab,lab-8);
}
length++;
swend += length;
ByteIntoBits(*swend, 0, 8);
swend++;
return 0;}
/****************************************************************/
int Single(){
int data = 0;
printf("Single %c\n",*swend);
ByteIntoBits((unsigned char)data,7,1);
ByteIntoBits(*swend,0,8);
swend++;
return 0;}
/***************************************************************/
void foo(){
int a=0;
swbegin = swend - SW;
while(swend<=labegin){
length = LA;
if(Findbiggest()){ Code();}
else { Single();}
swbegin = swend - SW;
}
if(lastrun){
length=endfile-swend-1;
while(length>minsearch){ if(Findbiggest()){ Code();}
else { Single();}
swbegin = swend - SW;
length=endfile-swend-1;
}
}

alreadyin=swend-labegin;
for(a=0;a swend=bigbuf+SW;
}

/******************************************************************/
int main(){
char buf1[100];
int i = 8;
alreadyin = lastrun = lastbits = 0;
swb = lab = 3;
printf("\n\nPlease enter the size of your sliding window: ");
scanf("%d", &SW);
printf("\n\nPlease enter the size of the look-ahead buffer: ");
scanf("%d", &LA);

while(i while(i
minsearch = (9+swb+lab)/9;

printf("\nFor reasons above your level of intelligence you were");
printf("\ngiven a SW size of %d and LA buffer of %d\n",SW,LA);

bigbuf=(char *)malloc(2*SW + LA);
for(i=0;i printf("\n\nWhat file do you want to compress? ");
scanf("%s",buf1);
fin = fopen(buf1,"rb");
printf("\n\nWhere do you want to compress into? ");
scanf("%s",buf1);
fout =fopen(buf1, "wb");
if(!fin || !fout){puts("Could not open file - exit!!!");
exit(1);}
/******************************************************************/


 
Posted on 11-09-04 2:47 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

No one here to help me out? Do we have any programmers in this Sajha land? I thought there were some professionals visiting this site.
Any help would be much appreciated.
Thanks,
LoGiN
 
Posted on 11-10-04 2:14 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

that looks hella complex.. programming :S:S
 
Posted on 11-10-04 2:40 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

login...
thats C aint it?know nothing about it...
its Echoes bro u should be lookin for :o)..and i think he is busy ...but he is helpful ...so if ur really desperate for help(well i know what desperation does to ppl...im gettn desperate here...but not of assignments hehe..other thing :o)..sm other thing in life which well i dunno..makin me go desperate..:o)..) just email him..search for his nick and give him a nice friendly email ;o)..and well dun expect much..everyone is busy...but who knows?what might happen..never fails to try hoina?CARPE DIEM!!mate!!hehe

ok hope that helped...nothin i can do ...other than wish u good luck :o)..

laters...



danny




 
Posted on 11-10-04 2:45 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Lets hope some friends will solve it.
Maile ta question pani bujhina.

I have one question:
All say something is greater than nothing. But someties mamathics can prove it being false.
How do you prove it:

0>1
 
Posted on 11-10-04 2:57 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

sarala can i give it a try?hehe feelin too free..urghh tho i should be doin smthing...anyways not gonna solve in maths way..i sux in maths(and many other things too..hehe dun wanns showoff what those are right now..dun feel like showing off ;oP)

0 greater than 1
well
O hurt is greater than 1 hurt(or any number of hurt) aint it?
well im defining greater in another way...well diff ppl look at it diff perspective..hope u can see how im coming from :o)...less hurt in life is a greater life hoina?

but then again..if 0 hurt..will we ever realise and know how great our life is?irony aint it...we have to feel hurt to appreciate and later realise how great our life is...so actually maybe 0 hurt aint greater than 1(or more)hurt...cos well if we dun realise smthings..we dun appreciate it as much as we should..do we?i dunno what im talkin about ..or do i?hehe..confused bro!!im gettin more and more confused!!dyam i really need to change me nick!!!im confusedII and always been hehe...

life and its irony..when will it stop?hyaaa...do i want 0 hurt or do i want more..and how much hurt is enuf..before we can appreciate smthing..appreciate life?cos well it just seems too much..smtimes..and smtimes too little...


ok before i bhak bhak more useless stuffs here..(i do have conscience u know ;o) hehe..;oP)
off i go

have fun...


danny(confusedII nice nick eh?hehe)
 
Posted on 11-10-04 3:28 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

LZ77 dangggg dude!!! That's one hellouva code. hehe...

Okay, to be honest, I can understand the code you are using, but I just couldn't understand what you are trying to do? eh... what is LZ77 in the first place??? eheh... Okay, don't worry about explaing LZ77, baru code ali ramrari chapna mildaina? so that I could cut and paste and run in on my machine? eh... dimag ma ali bhayepani chirthyo... hehe... how does the input file looks like, how the output file should look line... alikati hint dim na, tyo code read garera kehi bujhe ta mari jaam, ali ali commenting pani garum na hau....

btw, be careful when u cut and paste the code

< -- > is a HTML tag, and it won't show up in Sajha...
I guess you should use pre tag... <pre>

(quick test)
 


Chapter 8

 
Posted on 11-10-04 3:33 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Ooops, nevermind.. eh
 
#include
#include
#include

//void display(unsigned value);
int main (void){

 
Posted on 11-10-04 3:59 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Login, so whats the problem, tyo bhanum na, maybe it's something basic hehe... that I can help you out with... Like you know sometime you miss this, and that, and you just couldn't figure it out... like forgetting -lm while compiling program that used math library functions.. eheh.. basic stuff ke... :P

Tyo code chai khaali echoes le bujhcha... natra we gotta find SM sainju.. :P da olTime Sajha C++ guru. :)
 
Posted on 11-10-04 5:58 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

lau na yo k language ho number ani k k po cha
wonderign again:D
 
Posted on 11-10-04 7:00 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Thanks for all your responses folks. LZ77 is supposed to compress and decompress a file. It's one of the algorithm used in WinZip which compresses the file (to make the file size smaller) and decompresses it to it's original file. I am sorry if most of you didn't have a clue what it's all about but I can't really have a good explanation if you are not a coder. It uses a dictionary, sliding window and look ahead buffer. Does that make sense to you? Probably not! hahah.. it's like someone giving me a chemistry test. SMSainju and Echoes seem to have disappeared in Sajha.
My program will ask for a file to be compressed and will create a compressed file. This program is only the compression part, I still need to write the decompression routine.
Anyways, if anyone's out there for any help, please respond.
Thanks bunch guys,
LoGiN
 
Posted on 11-10-04 7:43 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Hyaaa Sarala .... jahile pani yestai yestai question soddai basa.... yaha kasto intense Question ma bichar garira bela....
ANyways,, just found ur response funny...hahhaha
"maile ta question pani bujina" lol :p
Hehehe sachai bhanne ho bhane.. maile pani addi matra buje..well okieeeeeeeee 1/4 (25%) hehe if not half.:p
Indisguise:)
 
Posted on 11-18-04 11:44 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Hey Ya'll who were interested in the lz77 program. I finally finished it. Took a different approach and yes, I am done!!! What a relief.... This program will compress and decompress the file.
Peace!
LoGiN :)

#include
#include
#include
#include

#define SW_SIZE 4096 /* sliding window will be 4k bytes */
#define LA_SIZE 32 /* Look Ahead Buffer will be 32 bytes */
#define PASS 1
#define FAIL 0

/* function declarations */
void BytesToBits(unsigned char, int) ;
int BitsToBytes(unsigned char *, int) ;
int FindMatch(unsigned char *, unsigned char *, int) ;
int BiggestMatch(unsigned char *, unsigned char *, int) ;
void BuildZeroCode(unsigned char) ;
int BuildOneCode(int, unsigned char) ;
int ZeroCodeWrite(void) ;
int OneCodeWrite(void) ;

/* global variables */
int curr_len = 0 ;
unsigned char curr_byte = 0 ;
FILE *f_input, *f_output ;
unsigned char *p_start ;
unsigned char *p_sw ;
unsigned char *p_la ;
unsigned char *p_la_start ;
unsigned char *p_flag ;
unsigned char *p_end ;
int offset = 0 ;
int len ;
unsigned char temp[31] ;


void BytesToBits(unsigned char in_char, int in_len)
{
unsigned char temp_char, mask ;
if(in_len + curr_len > 7) /* the number bits to be added to curr_byte will at least
fill curr_byte to capacity */
{
temp_char = in_char ; /* stores in_char in temp variable for manipulation */
temp_char >>= (in_len + curr_len - 8) ; /* shifts temp variable over to the right
so the bits that we want to deal with are in
the appropriate psoition */
mask = (unsigned char)(pow(2, 8 - curr_len) - 1) ; /* creates a mask that will affect
the number of bits needed to fill
curr_byte */
temp_char &= mask ; /* sets all other bytes besides the ones that will fill curr_byte
to zero */
curr_byte |= temp_char ; /* puts the bit(s) needed to fill curr_byte in the
appropriate position(s) */
putc(curr_byte, f_output) ; /* writes curr_byte to a file */
curr_byte = 0 ; /* flushes curr_byte */
curr_len = in_len = in_len + curr_len - 8 ; /* changes curr_len and in len to reflect
how many bytes are needed to fill curr_byte */
curr_byte = (in_char <<= 8 - in_len) ; /* shifts any left over bits from in_char to the
appropriate position and puts them into curr_byte */
}

else /* the number of bits to be added to curr_byte does not fill curr_byte */
{
mask =(unsigned char)(pow(2, in_len) - 1) ; /* creates a mask that will affect the number
of bits to be added to curr_byte */
in_char &= mask ; /* sets all other bytes other bytes besides the ones to be added to
curr_byte to zero */
in_char <<= (8 - curr_len - in_len) ; /* shifts bits that are to be added to curr_byte
to the appropriate position */
curr_byte |= in_char ; /* adds bits to be added to curr_byte to curr_byte */
curr_len += in_len ; /* curr_len chnages to reflect nu,ber of free bits remaining in
curr_byte */
}
}

 
Posted on 11-18-04 11:45 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

int BitsToBytes(unsigned char *out_char, int out_len)
{
unsigned char temp_char, mask ;
if(out_len >= curr_len) /* number of bits need to fill out_char will require more bits
than currently available in curr_byte */
{
*out_char = curr_byte ; /* out_char stores the bits of curr_byte for manipulation */
(*out_char) >>= (8 - out_len) ; /* shifts the remaining bit(s) from curr_byte to the
appropriate position(s) in out_char */
mask = (unsigned char)(pow(2, out_len) - 1) ; /* creates a mask that will affect the
number of bits to be added to out_char */
(*out_char) &= mask ; /* sets all other bits besides the ones to be added to out_char
to zero */
curr_byte = (unsigned char)fgetc(f_input) ; /* retrieves next byte from file and puts it in
curr_byte */
if(feof(f_input)) /* if end of the file is reached, return 0 to main */
return FAIL ;
out_len -= curr_len ; /* sets lentgh of out_char to reflect how many bits are needed to
complete out_char */
temp_char = curr_byte ; /* stores curr_byte in temp_char for manipulation */
temp_char >>= (8 - out_len) ; /* shifts bits in temp_temp char that need to be added to
out_char to the appropriate position */
mask = (unsigned char)(pow(2, out_len) - 1) ; /* creates a mask that will affect the
number of bits to be addedd to out_chat */
temp_char &= mask ; /* sets all other bits besides the ones to be added to out_char to
zero */
(*out_char) |= temp_char ; /* adds bits to be added to out_char to out_char */
curr_byte <<= out_len ; /* shifts next available bits in curr_byte to the left
end of curr_byte */
curr_len = 8 - out_len ; /* changes length of curr_byte to reflect how many bits are
still available in curr_byte */
return PASS ; /* tells main that the end of file has not been reached */
}
else /* the number of bits to be added to out_char does not empty curr_byte */
{
*out_char = curr_byte ; /* out_char stores the bits of curr_byte for manipulation */
(*out_char) >>= 8 - out_len ; /* shifts the bits needed from curr_byte to the
appropriate position in out_char */
mask = (char)(pow(2,out_len)-1) ; /* creates a mask that will affect the number of
bits added to out_char */
(*out_char) &= mask ; /* sets all other bits besides the ones added to out_char to
zero */
curr_byte <<= out_len ; /* shifts next available bits in curr_byte to the left end of
curr_byte */
curr_len -= out_len ; /* changes the length of curr_byte to reflect how many bits are

still available in curr_byte */
return PASS ;
}
}

int FindMatch(unsigned char *srch, unsigned char *target, int target_len)
{
offset = 0 ;
while(srch + target_len < target)
{
if(!(memcmp(srch, target, target_len)))
return(target_len) ;
srch++ ;
offset++ ;
}
return FAIL ;
}


 
Posted on 11-18-04 11:46 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

int FindMatch(unsigned char *srch, unsigned char *target, int target_len)
{
offset = 0 ;
while(srch + target_len < target)
{
if(!(memcmp(srch, target, target_len)))
return(target_len) ;
srch++ ;
offset++ ;
}
return FAIL ;
}

int BiggestMatch(unsigned char *srch, unsigned char *target, int target_len)
{
int i ;
for(i = target_len ; i > 1 ; i--)
{

if(FindMatch(srch, target, i))
{
BuildOneCode(i, *(target+i)) ;
p_la += i + 1 ;
p_sw = p_la - SW_SIZE ;
return PASS ;
}
}
BuildZeroCode(*target) ;
p_la++ ;
p_sw = p_la - SW_SIZE ;
return FAIL ;
}

void BuildZeroCode(unsigned char in_char)
{
unsigned char my_char = 0 ;
BytesToBits(my_char, 1) ;
BytesToBits(in_char, 8) ;
}

int BuildOneCode(int len, unsigned char in_char)
{
unsigned char *p_char ;
unsigned char my_char = 1 ;
BytesToBits(my_char, 1) ;
p_char = (unsigned char*)&offset ;
BytesToBits(*p_char, 8) ;
p_char++ ;
BytesToBits(*p_char, 4) ;
p_char = (unsigned char *)&len ;
BytesToBits(*p_char, 5) ;
BytesToBits(in_char, 8) ;
return PASS ;
}

int ZeroCodeWrite(void)
{
unsigned char ch ;
int i ;

i = BitsToBytes(&ch, 8) ;
if(!i)
return FAIL ;
*p_la = ch ;
p_la++ ;
p_sw++ ;
return PASS ;
}

int OneCodeWrite(void)
{
unsigned char ch, *p_ch ;
int i ;

p_ch = (unsigned char *)(&offset) ;
i = BitsToBytes(p_ch, 8) ;
if(!i)
return FAIL ;
i = BitsToBytes(++p_ch, 4) ;
if(!i)
return FAIL ;
p_ch = (unsigned char *)(&len) ;
i = BitsToBytes(p_ch, 5) ;
if(!i)
return FAIL ;
memcpy(p_la, p_sw + offset, len) ;
p_la += len ;
i = BitsToBytes(&ch, 8) ;
*p_la = ch ;
p_la++ ;
p_sw = p_la - SW_SIZE ;
return PASS ;
}

 
Posted on 11-18-04 11:47 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

And the Main program!!

int main(void)
{
unsigned char ch ;
int i = 0 ,n ;
char input[10], infile_name[1024], outfile_name[1024], choice ;

printf("\n*************LZ77 MENU*************\n") ;
printf("-----------------------------------") ;
printf("\nc - Compress File") ;

printf("\nd - Decompress File") ;
printf("\n-----------------------------------\n") ;
printf("\nEnter Choice -> ") ;
fgets(input, sizeof(input), stdin) ;
while(input[0] != 'c' && input[0] != 'C' &&
input[0] != 'd' && input[0] != 'D')
{
printf("\nEnter Choice -> ") ;
fgets(input, sizeof(input), stdin) ;
}
choice = input[0] ;
p_start = (unsigned char *)calloc(2 * SW_SIZE + LA_SIZE, sizeof(unsigned char)) ; /* allocates

memory for

2*SW*LA */
if(p_start == NULL)
{
printf("\n***CALLOC FAILED***\n") ;
exit(0) ;
}
p_la = p_la_start = p_start + SW_SIZE ;
p_sw = p_start ;
p_flag = p_la + SW_SIZE ;
switch(choice)
{
case 'c': case 'C':
printf("\nEnter file to compress -> ") ;
gets(infile_name) ;
while(infile_name[0] == NULL)
{
printf("\nEnter file to compress -> ") ;
gets(infile_name) ;
}
f_input = fopen(infile_name,"rb+") ; /* opens the file if it exists */
if(f_input == NULL)
{
printf("\n***FILE NOT FOUND***\n") ;
exit(0) ;
}
printf("\nEnter file to compress to -> ") ;
gets(outfile_name) ;
while(outfile_name[0] == NULL)
{
printf("\nEnter file to compress to -> ") ;
gets(outfile_name) ;
}
f_output = fopen(outfile_name,"wb+") ;
if(f_output == NULL)
{
printf("\n***ERROR CREATING OUTPUT FILE FOR COMPRESSION***\n") ;
exit(0) ;
}

 
Posted on 11-18-04 11:47 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

n = fread(p_la, 1, SW_SIZE + LA_SIZE, f_input) ;
while(n + i == SW_SIZE + LA_SIZE)
{
BiggestMatch(p_sw, p_la, 31) ;
if(p_la >= p_flag)
{

i = 32 - (p_la - p_flag) ;
memcpy(p_start, p_sw, SW_SIZE) ;
p_sw = p_start ;
memcpy((char *)p_la_start, (char *)p_la, i) ;
p_la = p_la_start ;
memset(p_la + i, 0, SW_SIZE + LA_SIZE - i) ;
n = fread(p_la + i, 1, SW_SIZE + LA_SIZE - i, f_input) ;
}
}
p_end = p_la + n + i ;
while(p_la < p_end)
{
if(p_end - p_la <= 31)
BiggestMatch(p_sw, p_la, p_end - p_la - 1) ;
else
BiggestMatch(p_sw, p_la, 31) ;
if(p_la >= p_flag)
{
i = 32 - (p_la - p_flag) ;
memcpy(p_start, p_sw, SW_SIZE) ;
p_sw = p_start ;
memcpy((char *)p_la_start, (char *)p_la, i) ;
p_la = p_la_start ;
memset(p_la + i, 0, SW_SIZE + LA_SIZE - i) ;
p_end = p_la + (LA_SIZE - i) ;
}
}
if(curr_len % 8 != 0) /* if the final inputted char bits does not completly fill
curr_byte ... */
BytesToBits((unsigned char)0, 8 - curr_len) ; /* ... add enough zeros to complete a byte */
printf("\nFinished compressing to file %s\n", outfile_name) ;
break ;
case 'd': case 'D':
printf("\nEnter file to decompress -> ") ;
gets(infile_name) ;
while(infile_name[0] == NULL)
{
printf("\nEnter file to decompress -> ") ;
gets(infile_name) ;
}
f_input = fopen(infile_name,"rb") ; /* opens the test.dat file if it exists */
if(f_input == NULL)
{
printf("\n***FILE NOT FOUND***\n") ;
exit(0) ;
}
printf("\nEnter file to decompress to -> ") ;
gets(outfile_name) ;
while(outfile_name[0] == NULL)
{
printf("\nEnter file to decompress to -> ") ;
gets(outfile_name) ;
}
f_output = fopen(outfile_name,"wb") ;
if(f_output == NULL)
{
printf("\n***ERROR CREATING OUTPUT FILE FOR COMPRESSION***\n") ;
exit(0) ;
}
n = 1 ;
curr_byte = (unsigned char)fgetc(f_input) ;
curr_len = 8 ;
while(n)
{
if(p_la >= p_flag)
{
fwrite(p_la_start, 1, p_la - p_la_start, f_output) ;
memcpy(p_start, p_sw, SW_SIZE) ;
memset(p_la_start, 0, SW_SIZE + LA_SIZE) ;
p_la = p_la_start ;
p_sw = p_start ;
}
n = BitsToBytes(&ch, 1) ;
switch(ch)
{
case 0:
if(ZeroCodeWrite() == 0)
break ;
break ;
case 1:
if(OneCodeWrite() == 0)
break ;
break ;
}
}
fwrite(p_la_start, 1, p_la - p_la_start, f_output) ;
printf("\nFinished uncompressing to file %s\n", outfile_name) ;
break ;
}
fclose(f_input) ;
fclose(f_output) ;
free(p_start) ;
return FAIL ;
}

 
Posted on 11-18-04 1:28 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

yeaaaooooooooo!!!!
tinininininininininininini.... dhyaaap!!!

ouch!! Aaankhai dukhyo yaar!! LOL...
Nice to see u're done... So, how u feeling?? hehe.

Anybody knows MIPS re kyaa aba!! :P

 
Posted on 11-18-04 1:56 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

My personal suggestion to you:

Now you have code whether its written by you or someone else does not matter
much.

Decode your own program using flow chart. I hope that you know how
to draw a flow chart. Spend your time to draw a complete flow chart
(decode the program), just pick up a large sheet of paper and draw
the flow chart based on the code you have pasted here in this forum.
I am sure you will find the reason why your program does not work.

In the past I hade decoded several programs written by someone else
whom I never met, neither will never meet and modified to suit my need.
The programs were as big as 10000 lines including all subroutines. The
program did not have any manual and nothing else except a few published
research papers based on the program. I taught that trick to my students
who were doing Undergraduate, M.E. and Ph.D. works. I had to spend
more time on the notations on the flow chart and less time on how to
decode it. I mean once you know the relation between flow chart and
program language, you can debug yourself. Its efficient from both
perspective: time and effort.

GP
 
Posted on 06-20-06 8:35 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Thanks GP and all others for your response!!! I know it's beena while but wanted to thank you all for your support!!!
-LoGiN
 


Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 200 days
Recommended Popular Threads Controvertial Threads
शीर्षक जे पनि हुन सक्छ।
NRN card pros and cons?
What are your first memories of when Nepal Television Began?
TPS Re-registration
Democrats are so sure Trump will win
TPS Re-registration case still pending ..
Basnet or Basnyat ??
nrn citizenship
Sajha has turned into MAGATs nest
Nas and The Bokas: Coming to a Night Club near you
ChatSansar.com Naya Nepal Chat
डीभी परेन भने खुसि हुनु होस् ! अमेरिकामाधेरै का श्रीमती अर्कैसँग पोइला गएका छन् !
3 most corrupt politicians in the world
अमेरिकामा बस्ने प्राय जस्तो नेपालीहरु सबै मध्यम बर्गीय अथवा माथि (higher than middle class)
if you are in USA illegally and ask for asylum it is legal
Returning to Nepal with us citizenship. Property ownership
Travelling to Nepal - TPS AP- PASSPORT
Top 10 Anti-vaxxers Who Got Owned by COVID
आज बाट तिहारको सेल सकियो
निगुरो थाहा छ ??
Nas and The Bokas: Coming to a Night Club near you
Mr. Dipak Gyawali-ji Talk is Cheap. US sends $ 200 million to Nepal every year.
Harvard Nepali Students Association Blame Israel for hamas terrorist attacks
TPS Update : Jajarkot earthquake
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters