# Print the ASCII printable character set

Challenge: Print the entire printable ASCII charset (not just a range!) in order.

For i=32To 126:?Chr$(i);:Next  Yabasic: Try it online! VBA: There is no TIO for VBA :( # JavaScript (Node.js), 47 bytes for(i=31;++i<127;)alert(String.fromCharCode(i))  Try it online! • I'm pretty sure Node.js doesn't have alert. – Leaf Commented Jul 29, 2022 at 20:58 # Prolog (SWI), 80686762 45 bytes ?-between(32,126,I),writef('%n',[I]),1=0;1=1.  Try it online! # Befunge-93, 18 bytes  g:"~"#@_:,1+00p#  You can try it here. The leading space is important!  The current character to be printed/checked, starts loop with a space g Push character from (0|0) onto stack(using the implicit 0s on the empty stack) :"~"#@_ Check whether the char on (0|0) is over ~, if yes then end :,1+00p Duplicate current char for output and incrementation # Since the code is a torus, it would continue at (0|0) so we skip it, since it could break the code.  # Python - 41 bytes for i in range(32, 127, 1): print(chr(i))  Python has a built-in ASCII function, so we can use that and print all 95 characters in a loop, one at a time. ### No newlines - 50 bytes for i in range(32, 127, 1): x = x + chr(i) print(x)  This is just in case newlines aren't allowed, so this entry still gets in. # naz, 32 bytes 4a5m6m6a2x1v1x1f1a1o3x1v1l0x4d1f  Try it online! Explanation (with 0x instructions removed) 4a5m6m6a2x1v # Set variable 1 equal to 126 1x1f # Function 1 1a1o # Add 1 to the register, then output 3x1v1l # Goto the start of the function if the register is less than variable 1 4d # Integer divide by 4, setting the register to a value of 31 1f # Call function 1  # Pxem, 17 bytes (filename) + 0 bytes (content) = 17 bytes. • Filename (some unprintables are escaped): ~.z.c\001.-.c\037.a.s.p • Content: empty. Try it online! ## With comments XX.z .a~.zXX.z # push 127; while size<2 || (pop!=pop); do .a.cXX.z # dup .a\001.-XX.z # push 1; push abs(pop-pop) iff size>=2 .a.cXX.z # dup .a\037.aXX.z # push 31; done .a.s.pXX.z # pop (* to remove 31 *); while size>0; do printf "%c", pop; done .a  # Factor, 18 bytes 32 126 [a,b] write  Works in any modern version of Factor that supports printing non-string sequences directly. (i.e. not TIO.) # Kotlin, 27 bytes (' '..'~').joinToString("")  Try it online! # Knight, 23 bytes ;=a 31W>127=a+1aO+Aa"\"  Try it online! Unminified: ; = a 31 : WHILE (> 127 (= a (+ 1 a))) : OUTPUT (+ (ASCII a) "\")  # Ly, 7 bytes ' '~R&o  Try it online! ' '~ - push first (" ") and last ("~") printable characters R - generate a rage of codepoints &o - print the stack as characters  # Z80Golf, 9 bytes 00000000: 3e 20 06 5f ff 3c 10 fc 76 > ._.<..v  Try it online! Assembler source (z80asm): start: ; start at space ld a, ' ' ; loop counter ; I could also cp 0x7f; jr nz, .loop but this is faster to TOTALLY make up for below ld b, 0x7F - ' ' .loop: ; Call 0x38, then nop slide to 0x8000 to print A to stdout ; only has a 130842 cycle overhead, which is worth the 2 bytes it saves rst 0x38 ; set A to the next char inc a ; Decrement b, then loop if non-zero djnz .loop ; Exit halt  Pretty straightforward loop approach. # Knight (v2), 23 bytes ;;=s@W>95s=s+sA+32sO^sN  Try it online! Another Alternative is ;=a@W>95=a+1aO+A+31a"\"  # Pascal, 66 B This program requires to be run on a processor using the ASCII character set (or a binary-compatible superset). The output will look quite different for instance on an IBM mainframe using EBCDIC. program p(output);var c:char;begin for c:=' 'to'~'do write(c)end.  Note, in Pascal for-loop limits are inclusive. During the final iteration c assumes the specified value '~'. # Alice, 14 bytes ' w.oh.'~h-$K@


Try it online!

## Explanation

' w.oh.'~h-$K@ Full program ' Adds 32 (space) on the stack w$K@   Repeat until...
.'~h-      ...we reach 126 (~)
.oh           Print and increase the current character


# Go, 45 bytes

func(){for i:=32;i<127;i++{print(string(i))}}


Attempt This Online!

Prints to STDERR.

# International Phonetic Esoteric Language, 21 bytes

{3j}{w}ɑeχue1søɒ


## Ungolfed

{3j}{w}   ( loop bounds: 32 w <= e < 127 3j )
ɑ         ( loop )
e        ( push index )
χ       ( ord index )
u      ( pop-output without newline )
e1sø  ( increment index )
ɒ ( end loop )
`