ysi y_iterate
#1

i used kar foreach and now switched to ysi\y_iterate
but y_iterate doesn't work as its suppose to work.
for example i added 33346 items but iteration stops at 14099
Reply
#2

PHP код:
very simple version of object system
#define max_objects 100000
new Iterator:fObjects<max_objects>;
    
main(){
    new 
rows=50000;
    if(!
rows)return print("No objects in db!");
    for(new 
irowsi++){    
        
Iter_Add(fObjects,i);
    }
    
//here is the bug i loaded 33346  but iter added 14100 rows...
    
printf("Rows: %d | Iter_Count(fObjects) : %d",rows,Iter_Count(fObjects));
    return 
1;

or much easier test
PHP код:
new Iterator:fTestIter<100000>;
CMD:foreach(pid){
    new 
i;
    for(
i=050000i++){
        
Iter_Add(fTestIter,i);
    }
    
fscm(pid,-1,"i: %d | iter_count: %d",i,Iter_Count(fTestIter));
    return 
1;
}
i50000 iter_count28525 
Reply
#3

so you completly ignore that your y_iterate doesn't work as it suppose to and you are not willing to even try if that bug exsists and trying to be smartass again?


https://github.com/pawn-lang/YSI-Includes
https://github.com/Zeex/amx_assembly
https://github.com/pawn-lang/compiler/releases
#include <YSI\y_iterate>

everything used in those examples is up to date.
Reply
#4

@******: "func" is probably referred to a macro such as #define func forward public, so should be a public already forwarded in the macro, so he dont have to type everytime:

forward Test()
public Test()

But just: func test
Reply
#5

PHP код:
main()
{
    new 
i
        
Iterator:Test_Iter<100000>;
    for(; 
50000i++)
    {
        
Iter_Add(Test_Iteri);
        if(
Iter_Contains(Test_Iteri))
            
printf("Iterator %i has been added - Iter's size: %i"iIter_Count(Test_Iter));
        else
            
printf("[%i] Nothing has been added - Iter's size: %i"iIter_Count(Test_Iter));
    }
    
printf("i: %d | iter_count: %d"iIter_Count(Test_Iter));

Some lines from logs where you can clearly see the bug:
Код:
[03:24:08] Iterator 14095 has been added - Iter's size: 14096
[03:24:08] Iterator 14096 has been added - Iter's size: 14097
[03:24:08] Iterator 14097 has been added - Iter's size: 14098
[03:24:08] Iterator 14098 has been added - Iter's size: 14099
[03:24:08] Iterator 14099 has been added - Iter's size: 14100
[03:24:08] Iterator 14100 has been added - Iter's size: 14100
[03:24:08] Iterator 14101 has been added - Iter's size: 14100
[03:24:08] Iterator 14102 has been added - Iter's size: 14100
[03:24:08] Iterator 14106 has been added - Iter's size: 14100
Код:
[03:24:09] Iterator 35570 has been added - Iter's size: 14100
[03:24:09] Iterator 35571 has been added - Iter's size: 14100
[03:24:09] Iterator 35572 has been added - Iter's size: 14100
[03:24:09] Iterator 35573 has been added - Iter's size: 14100
[03:24:09] Iterator 35574 has been added - Iter's size: 14100
[03:24:09] Iterator 35575 has been added - Iter's size: 14101
Reply
#6

so it was just too hard to see your code over there and you just start talking some other things that doesn't even matter.

we don't argue over the examples what i gave you, but the bugs that ysi \ y_iterate produced.

and that isnt awful coding practise cause i don't want to write some rows over and over again.

******"I’ve gone to some quite extensive lengths to ensure that my y_iterate works as it is supposed to (way more than any other libraries released on these forums). " go to hell with your length tests...
Reply
#7

Quote:
Originally Posted by CodeStyle175
Посмотреть сообщение
and that isnt awful coding practise cause i don't want to write some rows over and over again.
welcome to programming hope you enjoy your stay
Reply
#8

Quote:
Originally Posted by CodeStyle175
Посмотреть сообщение
so it was just too hard to see your code over there and you just start talking some other things that doesn't even matter.
Why did you edit your post then? You seriously need some help or need to grow up.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)