iskpun.gml

来自「开放源码的编译器open watcom 1.6.0版的源代码」· GML 代码 · 共 56 行

GML
56
字号
.func iskpun
#include <jctype.h>
int iskpun( int c );
.ixfunc2 '&CharTest' &func
.funcend
.desc begin
The &func function tests if the argument
.arg c
is a single-byte Katakana punctuation character.
A single-byte Katakana punctuation character is any character for
which the following expression is true:
.millust begin
0xA1 <= c <= 0xA5
.millust end
.desc end
.return begin
The &func function returns zero if the argument is not a single-byte Katakana
punctuation character;
otherwise, a non-zero value is returned.
.return end
.see begin
.im seejis &function.
.see end
.exmp begin
#include <stdio.h>
#include <jstring.h>
#include <jctype.h>

JMOJI chars[] = {
    'A',
    0x9941,
    0xA4,
    0xA6
};
.exmp break
#define SIZE sizeof( chars ) / sizeof( JMOJI )
.exmp break
void main()
  {
    int   i;
.exmp break
    for( i = 0; i < SIZE; i++ ) {
      printf( "Char is %sa single-byte "
              "Katakana punctuation character\n",
            ( iskpun( chars[i] ) ) ? "" : "not " );
    }
  }
.exmp output
Char is not a single-byte Katakana punctuation character
Char is not a single-byte Katakana punctuation character
Char is a single-byte Katakana punctuation character
Char is not a single-byte Katakana punctuation character
.exmp end
.class WATCOM
.system

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?