CALL KTYPE
This page was last modified 03:56, 29 November 2016 by Mars2000you.

Contents

Effect

Checks the character type A of a character in a specified position of a string A$:
- Hankaku or Zenkaku in Kanji BASIC
- Non-Korean or Korean in Hangul BASIC

A Hankaku accent will be counted as an independent character.

Syntax

CALL KTYPE(A,A$,<position>)

Parameters

A is a value that will be returned by this instruction, this value defines a character type
0: Hankaku in Kanji BASIC / Non-Korean in Hangul BASIC
1: Zenkaku in Kanji BASIC / Korean in Hangul BASIC

A$ is a a string (between quotation mark)

For a correct working, it's better to use Hangul characters regrouped in blocks.

<position> can vary between 1 and 255, but don't specify it larger than number of characters in A$ or you'll get an error message!

Examples

CALL KTYPE(A,"ハンカク全角",1):PRINT A
 0
CALL KTYPE(A,"ハンカク全角",5):PRINT A
 1

Hankaku/Zenkaku

In the Japanese language, the following characters are hankaku (1-byte) : English alphabets, numbers, western punctuation, unaccented katakanas and hiraganas, Japanese punctuation, Japanese accents.

In the Zenkaku, 2-byte characters, you find all hiraganas and katakanas, both accented and unaccented, English alphabets, special pictograms like large circles and measurement terms, Greek and Russian fonts, and thousands of kanjis. These are contained in the big Kanji ROM (128kB if JIS1, 256kB if JIS1+JIS2).

Related to

CALL AKCNV, CALL KACNV, CALL KEXT, CALL KLEN

Compatibility

Hangul BASIC version 3 or higher, Kanji BASIC