# Beep

• ### Question

• put this code in SB:

TextWindow.ForegroundColor = "green"

For i=1 To 10000

char = Math.GetRandomNumber(255)

TextWindow.Write(Text.GetCharacter(char))

TextWindow.Write(Math.GetRandomNumber(2)-1 + " ")

char = Math.GetRandomNumber(255)

TextWindow.Write(Text.GetCharacter(char))

EndFor

|"| /"/|"""\ /"""\|"| |__ __| /\ |"""\ |"| | |/ / | " / | | || | | | / \ | |\ \ | | | |\ \ | | \ | | || |__ | | / \ | | \ \| | |_| \_\|_|\_\\___/|____| |_| /_/""\_\|_| \___|
Wednesday, June 30, 2010 9:05 PM

• Ascii code 7 is an old fashioned system beep - a throwback to the early days.  Normal letters etc start at 32 (space).

TextWindow.Write(Text.GetCharacter(7))

And to test this with your program:

TextWindow.ForegroundColor = "green"

For i=1 To 10000
char = Math.GetRandomNumber(255)
If (char <> 7) Then
TextWindow.Write(Text.GetCharacter(char))
EndIf

TextWindow.Write(Math.GetRandomNumber(2)-1 + " ")

char = Math.GetRandomNumber(255)
If (char <> 7) Then
TextWindow.Write(Text.GetCharacter(char))
EndIf
EndFor

• Marked as answer by Wednesday, June 30, 2010 11:00 PM
Wednesday, June 30, 2010 9:52 PM

### All replies

• Ascii code 7 is an old fashioned system beep - a throwback to the early days.  Normal letters etc start at 32 (space).

TextWindow.Write(Text.GetCharacter(7))

And to test this with your program:

TextWindow.ForegroundColor = "green"

For i=1 To 10000
char = Math.GetRandomNumber(255)
If (char <> 7) Then
TextWindow.Write(Text.GetCharacter(char))
EndIf

TextWindow.Write(Math.GetRandomNumber(2)-1 + " ")

char = Math.GetRandomNumber(255)
If (char <> 7) Then
TextWindow.Write(Text.GetCharacter(char))
EndIf
EndFor

• Marked as answer by Wednesday, June 30, 2010 11:00 PM
Wednesday, June 30, 2010 9:52 PM
• what is the char 7?

|"| /"/|"""\ /"""\|"| |__ __| /\ |"""\ |"| | |/ / | " / | | || | | | / \ | |\ \ | | | |\ \ | | \ | | || |__ | | / \ | | \ \| | |_| \_\|_|\_\\___/|____| |_| /_/""\_\|_| \___|
Thursday, July 1, 2010 8:26 PM
• Ascii code 7 is a beep, not a screen character. See a table of ascii codes .  The first 32 (0 to 31) are mostly for control, not printable characters.
Thursday, July 1, 2010 8:34 PM
• ah!

but if i press Alt + 7 it comes a • and others until 32 come as (the 0 does nuthing) ☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼

|"| /"/|"""\ /"""\|"| |__ __| /\ |"""\ |"| | |/ / | " / | | || | | | / \ | |\ \ | | | |\ \ | | \ | | || |__ | | / \ | | \ \| | |_| \_\|_|\_\\___/|____| |_| /_/""\_\|_| \___|
Thursday, July 1, 2010 9:32 PM