我編程C(ANSI C)一個POS(銷售點)方法的位標誌參數如何工作(Ansi C/C)?
我有這個功能
GetString(uchar *str,uchar mode,uchar minlen,uchar maxlen)
是像readln
但在POS
在API的mode
參數是一樣的東西D1,D2,D3 ......
但在(API的)的例子,我有這個
if(!GetString(buf, 0x26, 0, 10))
{
buf[buf[0]+1]=0; amt=atol(buf+1);
} else {
/* user press CANCEL button */ }
那麼,什麼是介乎值爲0x26(參數mode
在功能)和 二進制數或位標誌,甚至,我不知道,十六進制的關係。
在API那裏有另一件事說明mode
輸入參數
1. Input mode definition: (priority order is bit3>bit4>bit5, and mode&0x38≠0);
2. When inputting, the digit will be displayed on the screen in turns as plaintext or cryptograph (according to bit3).
3. The initial cursor position is determined by ScrGotoxy(x, y).
4. If bit7 of mode =1, then this function could bring initial digit string, and the string is displayed on initial cursor position as input digit string.
5. Output string does not record and contain function keys.
6. Press CLEAR button, if it is plaintext display, then CLEAR is considered as BACKSPACE key; if it is cryptograph display, then CLEAR is considered as the key to clear all contents.
7. Use function key to switch to Capital mode. S80 uses Alpha key to select the corresponding character on a key, however SP30 uses UP and Down key, and T52 uses ―#‖ key, T620 uses key F2.
8. In MT30, the switch method between uppercase, lowercase and number characters is to keep pressing
我知道我的英語不好...但是,爲什麼我的問題有-2點:c我恐怕會失去我在stackOverflow中的帳戶,你們真的幫我 –