Original von below
2) Wie ich schon sagte hängt das, was Du siehst stark davon ab, wie das Terminal, an dem Du es ausgibts das interpretierst
Jip.
Hier mal ein kleines Beispiel:
Quellcode
- #include <stdio.h>
- main()
- {
- short int ordnungszahl = 32;
- char zeilenzahl;
- for(zeilenzahl = 1; zeilenzahl < 14; zeilenzahl++)
- {
- for(ordnungszahl; ordnungszahl < 256; ordnungszahl = ordnungszahl + 16)
- {
- printf("%3c %3c %3c %3c %3c %3c %3c %3c %3c %3c %3c %3c %3c %3c %3c %3c\n", ordnungszahl, ordnungszahl + 1, ordnungszahl + 2, ordnungszahl + 3, ordnungszahl +4, ordnungszahl + 5, ordnungszahl + 6, ordnungszahl + 7, ordnungszahl + 8, ordnungszahl + 9, ordnungszahl + 10, ordnungszahl + 11, ordnungszahl + 12, ordnungszahl + 13, ordnungszahl + 14, ordnungszahl + 15);
- zeilenzahl ++;
- }
- }
- }
(wegen der Prüfung der FOR-Schleife gibt es hier keinen unsigned char, der kann ja nur bis 255)
Das gibt bei meinem Terminal folgende Ausgabe:
Quellcode
- g5:~/Documents/Tests ldv$ gcc char_test.c
- g5:~/Documents/Tests ldv$ ./a.out
- ! " # $ % & ' ( ) * + , - . /
- 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
- @ A B C D E F G H I J K L M N O
- P Q R S T U V W X Y Z [ \ ] ^ _
- ` a b c d e f g h i j k l m n o
- p q r s t u v w x y z { | } ~
- ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
- ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
- ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
- ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
- ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
- ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
- ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
- ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
Gehe ich jetzt auf Terminal->Fenstereinstellungen - [Darstellung] - Zeichensatzcodierung [Westeuropäisch (ASCII)] sieht das Ganze wie folgt aus:
Quellcode
- g5:~/Documents/Tests ldv$ ./a.out
- ! " # $ % & ' ( ) * + , - . /
- 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
- @ A B C D E F G H I J K L M N O
- P Q R S T U V W X Y Z [ \ ] ^ _
- ` a b c d e f g h i j k l m n o
- p q r s t u v w x y z { | } ~
- ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯
- ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿
- À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï
- Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß
- à á â ã ä å æ ç è é ê ë ì í î ï
- ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ
«Applejack» "Don't you use your fancy mathematics to muddle the issue!"
Iä-86! Iä-64! Awavauatsh fthagn!
Iä-86! Iä-64! Awavauatsh fthagn!
kmr schrieb:
Ach, Du bist auch so ein leichtgläubiger Zeitgenosse, der alles glaubt, was irgendwelche Typen vor sich hin brabbeln. :-P