Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/28/02 13:09
Read: times


 
#28060 - RE: Clean code
"I have written some code ... outputs a menu ... it does work but is ugly."

Do you mean your code is ugly, or the menu is ugly?

What do you mean by "ugly?"
Beauty being in the eye of the beholder, what would you consider "pretty?"

"...pad each text line with spaces so they are the same length"

Note that this will work only if your terminal is set to use a mono-spaced (ie, not proportional) font; I wouldn't rely on hypoterminal to do this...
(actually, I wouldn't rely on hypoterminal. Period.)

Presumably your PUTSTRING routine currently detects the null byte to mark the end of the string?
I think that's probably better (certainly more flexible) than forcing your strings to a constant length: Using a fixed length means you have to count the characters; just testing for zero needs no counter (and you need to make that test anyway if you're counting!)

List of 20 messages in thread
TopicAuthorDate
Clean code            01/01/70 00:00      
RE: Clean code            01/01/70 00:00      
RE: Clean code            01/01/70 00:00      
RE: Clean code            01/01/70 00:00      
RE: Clean code            01/01/70 00:00      
RE: Clean code            01/01/70 00:00      
RE: Clean code            01/01/70 00:00      
RE: Clean code - to Donald            01/01/70 00:00      
RE: Clean code George, Donald            01/01/70 00:00      
RE: Clean code            01/01/70 00:00      
RE: Clean code            01/01/70 00:00      
RE: Null terminator            01/01/70 00:00      
CRLF? LFCR?            01/01/70 00:00      
RE: Clean code            01/01/70 00:00      
RE: Clean code - to Philip            01/01/70 00:00      
RE: Null terminator            01/01/70 00:00      
Hyperterminal alternative            01/01/70 00:00      
RE: Clean code            01/01/70 00:00      
RE: Hyperterminal alternative            01/01/70 00:00      
RE: Hyperterminal alternative            01/01/70 00:00      

Back to Subject List