[Include] Unsigned Long 61 bit
#2

1. Use strcat instead of your strcopy stock. Your stock function is insanely slow compared to strcat.

Code:
str[0] = 0;
strcat(dest, source);
2.
Code:
stock GetLYString(prefix,sufix,string[]){
	new buffer[20];
	if(prefix == 0){
		format(buffer,sizeof(buffer),"%d",sufix);
	} else {
		format(buffer,sizeof(buffer),"%d%09d",prefix,sufix);
	}
	strcopy(buffer,string);
}
What is the point of using format then strcopy?

Code:
stock GetLYString(prefix,sufix,string[], len = sizeof(string)){
	if(prefix == 0){
		format(string, len, "%d", sufix);
	} else {
		format(string, len, "%d%09d", prefix, sufix);
	}
}
Actually, the include can be rewritten using assembly/bitwise operations using a different algorithm of combining two cells into one. And a long var can be declared using tag, "new Long:number" (using defines, you can change that to new _long:number, _long:numberMS, _long:numberLS). One can even overload operators to carry out the basic operations on these number. I might work on this sometime in future.
Reply


Messages In This Thread
Unsigned Long 61 bit - by AbyssMorgan - 18.01.2016, 16:02
Re: Unsigned Long 61 bit - by Yashas - 26.01.2016, 08:03
Re: Unsigned Long 61 bit - by AbyssMorgan - 26.01.2016, 14:24
Re: Unsigned Long 61 bit - by CodeStyle175 - 27.01.2016, 14:57
Re: Unsigned Long 61 bit - by AbyssMorgan - 05.06.2016, 19:42
Re: Unsigned Long 61 bit - by AbyssMorgan - 16.06.2016, 15:52
Re: Unsigned Long 61 bit - by peiN56 - 09.07.2018, 14:49
Re: Unsigned Long 61 bit - by Verc - 09.07.2018, 16:08

Forum Jump:


Users browsing this thread: 1 Guest(s)