Euphoria Ticket #403: ? (print) on strings in docs examples

example from std/filesys.e

include std/filesys.e 
 ? temp_file("/usr/space", "myapp", "tmp") --> /usr/space/myapp736321.tmp 
 ? temp_file() --> /tmp/277382._T_ 

actual output

 
{46,92,109,121,97,112,112,56,53,48,57,56,50,46,116,109,112} 
{67,58,92,87,73,78,68,79,87,83,92,84,69,77,80,92,53,48,55,53,49,52, 
46,95,84,95} 
 

should the docs be lying about how '?' works on strings?

ex.err too

or is it something you just learn to deal with?

Details

Type: Bug Report Severity: Textual Category: Documentation
Assigned To: DerekParnell Status: Fixed Reported Release: 4127
Fixed in SVN #: 4193, 4451, 4484 View VCS: 4193, 4451, 4484 Milestone: 4.0.0RC2

1. Comment by jimcbrown Nov 17, 2010

The docs should be accurate. In this case, one can just delete the reference to ? altogether and the meaning will remain as intelligible as ever.

2. Comment by ne1uno Nov 17, 2010

other example samples

include std/convert.e 
? to_string("abc",'"')       --> "abc" 
 
include std/sequence.e 
? pivot( {7, 2, 8.5, 6, 6, -4.8, 6, 6, 3.341, -8, "text"}, 6 ) 
  -- Ans: {{2, -4.8, 3.341, -8}, {6, 6, 6, 6}, {7, 8.5, "text"}} 
 
 
include std/sequence.e 
? combine(s)                   --> {"cat","dog","fish","snail","whale","wolf","worm"} 
? combine(s, COMBINE_UNSORTED) --> {"cat","dog","fish","whale","wolf","snail","worm"} 
 
include std/locale.e 
? money(1020.5) -- returns"$1,020.50" 
 
? number(1020.5) -- returns "1,020.50" 
 
 
include std/datetime.e 
? datetime("Today is a %A",dt:now()) 
 
 
include std/stats.e 
? small( {"def", "qwe", "abc", "try"}, 2 )  
  --> Ans: {"def", 1} (The 2nd smallest value) 
 
? largest( {"just","text"} ) -- Ans: {} 
 

I think it will be a little strange to only use ? for numeric output, at least in the same set of examples.

 
include std/map.e 
? pairs(m1)  -- { {"AB", 2}, {"XY", 1} } 
 
--there are quite a few stack examples. only showing a few here 
include std/stack.e 
? at(sk,-1) -- "abc" 
 
? peek_top(sk,1)  -- "" 
actually is {} 
 
? peek_top(sk,2)  -- "abc" 

3. Comment by jimcbrown Nov 18, 2010

These all need to be changed. Showing the real output of ? is not helpful for documentation purposes, though.

4. Comment by DerekParnell Nov 18, 2010

Started working on fixes.

5. Comment by jeremy Dec 03, 2010

Completed and new manual uploaded.

Search



Quick Links

User menu

Not signed in.

Misc Menu