Euphoria Ticket #998: int_to_bytes missing var declarations, include line

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} 


Type: Task Severity: Normal Category: Documentation
Assigned To: euphoric Status: Fixed Reported Release:
Fixed in SVN #: View VCS: none Milestone: 4.1.0

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.


Quick Links

User menu

Not signed in.

Misc Menu