Forum Discussion

yonikes's avatar
yonikes
Visitor
10 years ago

Unclear documentation regarding boolean as a return code

Hi,

I'm new to BS so forgive me if i"m missing something obvious.

I came across many functions which are documented as returning boolean, but their documentation does not specify what is the meaning of this returned value. For example, the HttpAgent Interface supports this function:

AddHeader(name as String, value as String) as Boolean

But it's not mentioned how should one asses this return status. am I to guess that true is success and false is failure?

Thanks!

Yoni

2 Replies

  • A lot of times it doesn't matter, I think, and it's there just for testing/diagnostics. But I guess, depending how you program your channel, maybe in some cases its useful for functionality.
  • You're right, the exact meaning of the return value should be documented for each of the APIs. However in cases where this is lacking, true always means success and false means some kind of failure.

    --Mark