M
Manmeet Mittal
Hi all this is Manmeet Mittal,
Manmeet said:Hi all this is Manmeet Mittal,
I want to create menus and borders in c. How can make it. What r its codings.
Manmeet Mittal wrote:
puts(
"|------------------------|\n"
"| MAIN MENU |\n"
"|------------------------|\n"
"| 1. Add |\n"
"| 2. Subtract |\n"
"| 3. Multiply |\n"
"| 4. Quit |\n"
"|------------------------|\n");
Walter said:That assumes a fixed width font, which is not a portable assumption.
It also assumes that the display is at least 26 wide by 8 high,
which is also not portable.
Necessary correction: there's no way to do it in portable *standard* C.Skarmander said:There's no way to do "menus and borders" in the way the OP presumably
intends in portable C, so it hardly matters.
Walter said:That assumes a fixed width font, which is not a portable assumption.
It also assumes that the display is at least 26 wide by 8 high,
which is also not portable.
Walter said:With a proportional font it will still work, but just look weird.
With a proportional font, it is unlikely to fullfill the requirement
of having a "border". For example in the font 'ariel', the trailing
bar of several lines align with the end fof the U of the word
MENU .
What hosted C environment has a display less than 26x8 characters?
Windows on PalmOS might well be that small.
My program will also work on teletype printer terminals -- it does not
require a display.
teletypes sometimes have proportional fonts.
Heck, it assumes *a* display, which is not portable.
"menus and borders" in the way the OP presumably intends in portable C, so
it hardly matters.
With a proportional font it will still work, but just look weird.
What hosted C environment has a display less than 26x8 characters?
My program will also work on teletype printer terminals -- it does not
require a display.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.