annotate run/bug_20041103_B.d @ 98:75e0c2f6231e

kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
author thomask
date Wed, 03 Nov 2004 09:17:24 +0000
parents
children a33ad7189d21
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
98
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
1 // @author@ kinghajj <kinghajj_member@pathlink.com>
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
2 // @date@ 2004-10-03
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
3 // @uri@ news://cm98hu$e30$1@digitaldaemon.com
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
4 // @url@ nttp://digitalmars.com/digitalmars.D:12248
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
5
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
6 module dstress.run.bug_20041103_B;
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
7
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
8 void dummy(){
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
9 }
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
10
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
11 char rot13_c(in char ret){
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
12 if(ret > 'A'-1 && ret < 'N'){
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
13 ret += 13;
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
14 }else if(ret > 'M' && ret < 'Z'+1){
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
15 ret -= 13;
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
16 }else if(ret > 'a'-1 && ret < 'n'){
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
17 ret += 13;
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
18 }else if(ret > 'm' && ret < 'z'+1){
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
19 ret -= 13;
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
20 }
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
21 dummy();
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
22 return ret;
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
23 }
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
24
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
25 int main(){
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
26 char c = rot13_c('A');
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
27 assert(c=='A'+13);
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
28 return 0;
75e0c2f6231e kinghajj <kinghajj_member@pathlink.com> news://cm98hu$e30$1@digitaldaemon.com nttp://digitalmars.com/digitalmars.D:12248
thomask
parents:
diff changeset
29 }