Re: #define
marie65 said:
Q1)
Yes, but that's not the point. See Q2
Q2)
see h**p://www.unicode.org/ . The characters are coded on 16 bits.
Q3)
Yes, but the variable definition (int TRAN_BUFFER_LENGTH = 20) can be change at run time. The #define is seen as a constant.
No, we can't use always define.. define.., with the exception (unlikely) that your code don't use variables.
Hi,
Q1,2)
I understand already..., there are many type of code ASCII, UCS, UTF.. and so on.
Type Each character
encoded as Notes
7-bit a single 7-bit quantity example: ISO 646
8-bit G0/G1 a single 8-bit quantity with constraints on use of C0 and C1 spaces
8-bit a single 8-bit quantity with no constraints on use of C1 space
8-bit EBCDIC a single 8-bit quantity with the EBCDIC conventions rather than ASCII conventions
16-bit (UCS-2) a single 16-bit quantity within a code space of 0..FFFF
32-bit (UCS-4) a single 32-bit quantity within a code space 0..7FFFFFFF
32-bit (UTF-32) a single 32-bit quantity within a code space of 0..10FFFF
16-bit DBCS process code a single 16-bit quantity example: UNIX widechar implementations of Asian CCS's
32-bit DBCS process code a single 32-bit quantity example: UNIX widechar implementations of Asian CCS's
If we use ASCII it just the 8bit only, if we use UCS then it is 16bit but the program is difference writing already, not that simple
#define KEYPAD_NO_NEW_DATA (char) '-' already... am i right?
Q3)
Yes, but the variable definition (int TRAN_BUFFER_LENGTH = 20) can be change at run time
You mean that, eg:
Code:
int i=10;
for(i=0; i<10; i++)
{
}
The i will be changing all the time when program is run... So, is we..
Code:
#define i 10
.
.
for(i=0; i<10; i++)
{
}
The i define in this way is a ERROR because the i is the
constant .... am i right??
Thanks..