3bc-lang
3bc-lang copied to clipboard
remove all 'for' loops from source code
by the ANSI standard the first field of for
ends up not being used to instantiate variables, besides using while would be something simpler and more readable to maintain.
before
int i = 0;
for (; i < sizeof(any); i++) {
/** code **/
}
after
int i = 0;
while(i < sizeof(any)) {
/** code **/
i += 1;
}
Hey, where exactly do you want these changes to be done?
Hey, where exactly do you want these changes to be done?
Hi @ramyashreeshetty !
for all the source code, keep only do while
and while
if you want to contribute just replace each for
with a while
, and keep the indentation for the linter to approve.
Hello, @RodrigoDornelles is this issue still active?
Hello, @RodrigoDornelles is this issue still active?
Yes.
So, for this issue I basically have to just replace for with while, and where exactly I had to do this? Like is there any specific file that you could point to? @RodrigoDornelles
So, for this issue I basically have to just replace for with while, and where exactly I had to do this? Like is there any specific file that you could point to? @RodrigoDornelles
all there´s!
So, like do I have to visit every single file, and if there's a for loop present then I have to replace it with while? @RodrigoDornelles
So, like do I have to visit every single file, and if there's a for loop present then I have to replace it with while?
browse the code or use a search tool, all sources are in the src/
path, just apply a similar iteration to for()
using while()
keeping the initial behavior.
@RodrigoDornelles I had created the pr regarding the same, you could review it.
I had created the pr regarding the same, you could review it.
Tanks!
I've reviewed it, if u make some small changes I'll run the automatic tests to merge.