Show ASCII table: Difference between revisions

→‎{{header|ALGOL 68}}: Show the table vertically as with most of the other samples
(→‎{{header|C++}}: Removed defines)
(→‎{{header|ALGOL 68}}: Show the table vertically as with most of the other samples)
Line 437:
 
=={{header|ALGOL 68}}==
<syntaxhighlight lang="algol68">BEGIN
BEGIN
# generate an ascii table for characters 32 - 127 #
INTFOR c FROM 32 charTO count32 :=+ 1;15 DO
FOR cach FROM 32c BY 16 TO 127c + ( 16 * 5 ) DO
print( ( whole( cach, -4 )
, ": "
, IF cach = 32 THEN "SPC"
ELIF cach = 127 THEN "DEL"
ELSE " " + REPR cach + " "
FI
)
);
OD;
IF char count = 0 THEN print( ( newline ) ) FI;
print( char( countnewline PLUSAB 1) ) MODAB 6
OD
END
END</syntaxhighlight>
{{out}}
<pre> 32: SPC 3348: !0 3464: "@ 3580: #P 3696: $` 37112: %p
3833: &! 3949: '1 4065: (A 4181: )Q 4297: *a 43113: +q
4434: ," 4550: -2 4666: .B 4782: /R 4898: 0b 49114: 1r
5035: 2# 51: 3 5267: 4C 5383: 5S 5499: 6c 55115: 7s
5636: 8$ 5752: 94 5868: :D 5984: ;T 60100: < d 61116: =t
6237: >% 6353: ?5 6469: @E 6585: AU 66101: B e 67117: Cu
6838: D& 6954: E6 70: F 7186: GV 72102: H f 73118: Iv
7439: J' 7555: K7 7671: LG 7787: MW 78103: N g 79119: Ow
8040: P( 8156: Q8 8272: RH 8388: SX 84104: T h 85120: Ux
8641: V) 8757: W9 8873: XI 89: Y 90105: Z i 91121: [y
9242: \* 9358: ]: 9474: ^J 9590: _Z 96106: ` j 97122: az
9843: b+ 9959: c; 100 75: dK 10191: e[ 102107: fk 103123: g{
104 44: h, 105 60: i< 106 76: jL 10792: k\ 108: l 109124: m|
110 45: n- 111 61: o= 112 77: pM 11393: q] 114109: rm 115125: s}
116 46: t. 117 62: u> 118 78: vN 11994: w^ 120110: xn 121126: y~
122 47: z/ 123 63: {? 124 79: |O 125 95: }_ 126111: ~o 127: DEL</pre>
</pre>
 
=={{header|ALGOL W}}==
3,028

edits