Euphoria
Ticket #998:
8.13.1.1 int_to_bytes missing var declarations, include line
-
Reported by
irv
Sep 21, 2019
Should be:
Example 1:
include std/convert.e
sequence s = int_to_bytes(999)
? s
-- s is {231, 3, 0, 0}
Example 2:
include std/convert.e
sequence s = int_to_bytes(-999)
? s
-- s is {-231, -4, -1, -1}
Details
1. Comment by euphoric
Sep 22, 2019
I'm not sure the examples need to show the include, since the signature of the function already shows the required include statement for the function.
It also doesn't need the ?, since we're only showing what s is.
2. Comment by irv
Sep 23, 2019
No, it needs the include line. And actually printing the result proves to the user that the function works, why not use it?
3. Comment by euphoric
Oct 04, 2019
OK, I've been adding the include line to all the examples, and printing results.