Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
yonikes
Level 7

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
0 Kudos
2 Replies
Komag
Level 9

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.
0 Kudos
RokuMarkn
Level 7

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
0 Kudos