C–– Efficiency
5-55Code Development Tools
writeCharacter(’:’);
writeNum(time[WIDTH*0+2]); //seconds
writeCharacter(’ ’);
if(time[WIDTH*1+1]==0){ //ampm
writeCharacter(’A’);
}
else{
writeCharacter(’P’);
}
writeCharacter(’M’);
writeCharacter(’ ’);
switch(time[WIDTH*1+0]){ //days
case 0:
writeCharacter(’M’);
writeCharacter(’O’);
writeCharacter(’N’);
break;
case 1:
writeCharacter(’T’);
writeCharacter(’U’);
writeCharacter(’E’);
break;
case 2:
writeCharacter(’W’);
writeCharacter(’E’);
writeCharacter(’D’);
break;
case 3:
writeCharacter(’T’);
writeCharacter(’H’);
writeCharacter(’U’);
break;
case 4:
writeCharacter(’F’);
writeCharacter(’R’);
writeCharacter(’I’);
break;
case 5:
writeCharacter(’S’);
writeCharacter(’A’);
writeCharacter(’T’);
break;
case 6:
writeCharacter(’S’);
writeCharacter(’U’);
writeCharacter(’N’);
break;
}
switch(pendulum){
case 0:
writeCharacter(’ ’);
writeCharacter(’|’);
rowOne();
for(temp=0; temp<16; temp++) writeCharacter(’ ’);
writeCharacter(’o’);