shogundev
Joined 3 years ago
Joined 3 years ago
You can disregard and ignore most floating to int conversions and checks if youre NOT targeting python. Other platforms generally have just double precision and no integers (incluiding the C and Java ones) but not happening in python.
In your example x[1] == 1 yields true in any platform. So dont worry.
The for loop will iterate exacly end - start times with a start of 0 if missing and finish after end - 1 has executed.
Using the iteration variable after loop exit is undefined behavior, some platforms keep the last value stored like python and javascript, others will make a wild assignment to a global variable every time like lua or the C/Java editions.
Functions do NOT have variable lenght calls, if you read the code a second time, what its doing is looking up an array based in arguments length, and proceeding to switch on each case.
Hope this helped, will update the handbook if something is unclear.
- Shogun
Shogun
- Shogun
Having the exact behavoir in all platforms is not possible in some cases, and these are the cases left 'undefined' in the handbook.
Hope this clears things a bit ;)
Cheers, -Shogun
Shark used to stand for SHAred ARKitecture, since the language can compile to lua, python and javascript using the shared architecture found in the three. Now it stands for nothing really.
Edit: Typo check O _ O
Cheers, -Shogun
Cheers, - Shogun
-Shogun