EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā12-20-2016
09:20 AM
? ... --- ...
Today's wisecrack: did you know B/S implicitly supports Morse code? š
Pop-quiz: "So you think you know BrightScript? Try to guess what the following will output:"
Pop-quiz: "So you think you know BrightScript? Try to guess what the following will output:"
Brightscript Debugger> ? ... --- ...
3 REPLIES 3
joetesta
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā12-20-2016
10:56 AM
Re: ? ... --- ...
haha same thing this outputs:
if you end with a hyphen, you get a syntax error. if you print a dot, it outputs a zero. fun stuff!
? ...
if you end with a hyphen, you get a syntax error. if you print a dot, it outputs a zero. fun stuff!
aspiring
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā12-20-2016
11:17 AM
Re: ? ... --- ...
"joetesta" wrote:
if you end with a hyphen, you get a syntax error.
So we shan't signal messages that end in any of 'AJKMOQTUVWXY' 8-)
if you print a dot, it outputs a zero. fun stuff!
it's tad more complicated than that. SOS does not output 6 zeros
joetesta
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā12-20-2016
12:12 PM
Re: ? ... --- ...
"EnTerr" wrote:
it's tad more complicated than that. SOS does not output 6 zeros
Is it?
? ......
Brightscript Debugger> ? ......
0 0 0 0 0 0
Well something tricky is going on;
Brightscript Debugger> ? -.-.-.-.-.-.
0
Brightscript Debugger> ? ------......
0
Brightscript Debugger> ? ------ ......
0
Brightscript Debugger> ? - .....
0 0 0 0
Brightscript Debugger> ? -- .....
0 0 0
Brightscript Debugger> ? --- ...
0
Brightscript Debugger> ? --- ..
0
Brightscript Debugger> ? --- ........
0 0 0 0 0
So it seems each leading hyphen will remove one following period, but if there are any following periods it will always output at least one zero no matter how many leading hyphens there are.
hmm - no, these are not simple rules!
Brightscript Debugger> ? .....-----.
0 0 0 0 0
aspiring