GET_LONG_ANSWER error return

new topic     » topic index » view thread      » older message » newer message

The get()/value() documentation states this regarding the third element of the GET_LONG_ANSWER return sequence:

"an integer, the number of characters read. On an error, this is the point at which the error was detected." (emphasis added)

While tinkering with test cases, I found that the following fails:

test_equal("value() bad integer [LONG ANSWER]", {GET_FAIL, 0, 1, 0}, value("John",,GET_LONG_ANSWER)) 

causing this fail message:

failed: value() bad integer [LONG ANSWER], expected: {1,0,1,0} but got: {1,0,0,0} 

The documentation seems to me to be saying that the value("John", ,GET_LONG_ANSWER) call should return a 1 in the third element, as that is the point at which the error was detected, i.e. the very first character.

So, is this:

  • get() bug?
  • documentation error?
  • slowmaker's misunderstanding?
new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu