~rabbits/public-inbox

1

Code on fractran page is slightly wrong

Details
Message ID
<c83dd32d-6e43-4c50-be6c-1402969ca825@protonmail.com>
Sender timestamp
1737146774
DKIM signature
pass
Download raw message
Minor issue, this code:
```
while(year++) {
	for(season = 0; season < 4; season++) {
		if(year == 2 && season == 3)
			print("Reached!");
			return;
	}
}
```
should probably be
```
while(year++) {
	for(season = 0; season < 4; season++) {
		if(year == 2 && season == 3) {
			print("Reached!");
			return;
		}
	}
}
```
The braces should probably encompass both statements so it actually 
works as expected. It's still readable but it's just a minor mistake 
that's bugging me.
Details
Message ID
<3148b504-7fd0-41be-a036-ea0bc828b78c@100r.co>
In-Reply-To
<c83dd32d-6e43-4c50-be6c-1402969ca825@protonmail.com> (view parent)
Sender timestamp
1737118992
DKIM signature
pass
Download raw message
Ah! yes.

Thanks for catching this one, I'll update the example.

On 2025-01-17 12:46, thezipcreator wrote:
> Minor issue, this code:
> ```
> while(year++) {
> 	for(season = 0; season < 4; season++) {
> 		if(year == 2 && season == 3)
> 			print("Reached!");
> 			return;
> 	}
> }
> ```
> should probably be
> ```
> while(year++) {
> 	for(season = 0; season < 4; season++) {
> 		if(year == 2 && season == 3) {
> 			print("Reached!");
> 			return;
> 		}
> 	}
> }
> ```
> The braces should probably encompass both statements so it actually
> works as expected. It's still readable but it's just a minor mistake
> that's bugging me.
> 
Reply to thread Export thread (mbox)