yonikes
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2015
03:30 AM
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
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 2

Komag
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2015
04:20 AM
Re: Unclear documentation regarding boolean as a return code
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.

RokuMarkn
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2015
06:54 AM
Re: Unclear documentation regarding boolean as a return code
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
--Mark