PDA

View Full Version : [QOD] Different output?



ErosOlmi
08-02-2013, 00:36
Here another QOD (Question Of the Day)

Which of the following 5 PRINTL thinBasic statements will print something different? :D



Uses "Console"

String A = "Hello"
String B = "world"

PrintL A + " " + B
PrintL A . " " . B
PrintL A, B
PrintL EXPAND$("$A $B")
PrintL A & " " & B

WaitKey

ReneMiner
08-02-2013, 03:08
quite confusing since the voting possibilities (1,2 and 5 are equal) in the first and in the last line are the same.

Really mind-cranking! :)

Petr Schreiber
08-02-2013, 09:44
Hehe,

I just voted #1 and now I see it was a bad choice, I should return my diploma from University of ThinBASIC :oops:

I thought the comma leads to tabbed out output, but was not sure if it will equal in one space between "Hello" and "world". Maybe it could be added to help file that comma separates the strings using space?


Petr