Forum Discussion

EnTerr's avatar
EnTerr
Roku Guru
9 years ago

setDouble() and the Void: oddity (buglet)

One of these is not like the others:

Brightscript Debugger> ?  4.2#.setDouble(0)
<bsTypedValue: >

Brightscript Debugger> ? 4.2!.setFloat(0)
<UNINITIALIZED>

Brightscript Debugger> ? "42".setString("")
<UNINITIALIZED>

Brightscript Debugger> ? 42%.setInt(0)
<UNINITIALIZED>

Yes, yes - i know the example is gaudy, stylistically - but let's focus on the difference: all these methods have "as void" return type - and i imagine <UNINITIALIZED> of type "<uninitialized>" is what the Void must look like (?). <bsTypedValue: > of type "" on the other hand is something else (undies showing?)

PS. speaking of space oddities, there seems to be another Void as far as B/S subs/functions are concerned:
Brightscript Debugger> f = function() as void: end function: ? f()
invalid

Brightscript Debugger> f = function() as integer: end function: ? f()
0
No RepliesBe the first to reply