Hello
How exactly do I type into a text box a power instead of typing 2^3?
Hello
How exactly do I type into a text box a power instead of typing 2^3?
I can only make a guess at what you're asking - one does not "type powers" into a textbox. Do you mean the character resembling a superscript 3?
Like 2³?
charmap will help, or you can input the unicode number on the keyboard, or copy/paste from the web. (Alt+0179, but I think I might have special options that allow me to do that.)
long time; /* know C? */
Unprecedented performance: Nothing ever ran this slow before.
Any sufficiently advanced bug is indistinguishable from a feature.
Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
The best way to accelerate an IBM is at 9.8 m/s/s.
recursion (re - cur' - zhun) n. 1. (see recursion)
My homepage
Advice: Take only as directed - If symptoms persist, please see your debugger
Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"
You can put Unicode characters into a textbox. But to support all the powers you would definitely need to use a Unicode font e.g. Arial Unicode MS. Though this has its drawbacks, e.g. their are only characters for 0-9, you would need more than one character for a power > 1 digit. As for a rich text field: It would probably display to the user better, but be harder to process, e.g. the program would have to sort through the style of the characters not the characters themselves to carry out any operation on the text (esp. for a calculator). A rich text box would be able to handle text of different sizes though. Think about what it is that you actually intend to do with the characters in a textbox, I assume that you don't just want to make an app in which the main window just has a textbox in it and doesn't carry out any other processing whatsoever.
long time no C; //seige
You miss 100% of the people you don't C;
Code:if (language != LANG_C && language != LANG_CPP) drown(language);
Thx for ideas I will see what I can do about the unicode... I am using multibyte currently. Does that apply also to multibyte or I must use unicode?
I don't know much about mutibyte characters and from the research I have done it seems that it is just a way of encoding text strings, I don't know if there is a way in which the user can type these characters into the textbox. If you know of any multibyte fonts, use them the above will probably work. Otherwise Unicode will work. Also note: their is only a limited number of keys on the keyboard. They are never going to be able to type in a ³ directly. A button or someway of hard-coding adding that character to the textbox might be a good way to go.
long time no C; //seige
You miss 100% of the people you don't C;
Code:if (language != LANG_C && language != LANG_CPP) drown(language);
What exactly do you mean by "multibyte"? Unicode can be encoded in multiple ways, the two most common being UTF-8 and UTF-16. In both encodings, you need more than one byte per character. If you're in Windows, and you're doing a unicode project, you're probably using UTF-16. (These are not the only two character encodings either... there are tons more.)Thx for ideas I will see what I can do about the unicode... I am using multibyte currently. Does that apply also to multibyte or I must use unicode?
In Windows, for example, I can type a ³ (U+00B3) into a textbox. (Alt+0179 on my keyboard) Now, whether or not a "superscript 3" character makes any sense to your program at all is entirely dependent on the program. It's a character, like '!', 'a' or '$' or even (if your browser can display this... '姨') If it's a math program, it's probably coded to recognize 2^3, not 2³. If you're doing the coding, I'd much rather (as a user) type 2^3 than 2³, for input, however, for output, if you want to look pretty, then 2³ might help. (Although note that you can't keep going, ie, 2^3^3 doesn't work unless you do font size changes, at which point ³ becomes irrelevant.)
long time; /* know C? */
Unprecedented performance: Nothing ever ran this slow before.
Any sufficiently advanced bug is indistinguishable from a feature.
Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
The best way to accelerate an IBM is at 9.8 m/s/s.
recursion (re - cur' - zhun) n. 1. (see recursion)
Have a look at Mirosoft Math, download the trial version. This features powers and might help.
long time no C; //seige
You miss 100% of the people you don't C;
Code:if (language != LANG_C && language != LANG_CPP) drown(language);