Classic VCS ASCII Adventure

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

use master
DECLARE @ table(v int, i int identity)
INSERT @ values
(0x06),(0x0F),(0xF3),(0xFE),(0x0E),(0x04),
(0x04),(0x1E),(0x3F),(0x7F),(0xE3),(0xC3),
(0xC3),(0xC7),(0xFF),(0x3C),(0x08),(0x8F),
(0xE1),(0x3F)

DECLARE @s INT=1,@h INT=1

DECLARE @f varchar(max)=''
SELECT @f+=y+char(10) FROM
(SELECT top 100 percent iif(@s>0,reverse(x),x)y FROM(SELECT
string_agg(replicate(iif(v&n=0,' ','X'),abs(@s)),'')x,i
FROM(values(1),(2),(4),(8),(16),(32),(64),(128))x(n),@,(SELECT top(abs(@h))*FROM
spt_values)g
GROUP BY i)f
ORDER BY i*@h)x
PRINT @f

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results