Progress
Internationalization Guide


Using the 4GL

Besides using the keyboard and possibly the mouse to enter multi-byte characters, you can also use the Progress 4GL. Specifically, this section covers:

Using the 4GL To Simulate Inputting Double-byte Characters

To input a double-byte character using the 4GL, assemble the character using the CHR function, whose syntax is:

SYNTAX
CHR ( expression 
      [ , target-codepage [ , source-codepage ] ]
    ) 

DEFINE VARIABLE Double-byte-char as CHAR.
Double-byte-character = CHR( (236 * 256) + 237 ).
DISPLAY Double-byte-char WITH 1 COLUMN. 

In the preceding example, the second line shifts the first value into the lead byte and adds the second value to the trail byte.

NOTE: The preceding example assumes that the internal code page (-cpinternal) is set to KSC5601.

Using the 4GL to Simulate Key Presses and Mouse Clicks

Besides using the Progress 4GL to simulate the input of characters, including multi-byte characters, you can also use the 4GL to simulate key presses and mouse clicks in a multi-byte environment. Table 8–2 describes the 4GL elements involved and the multi-byte support provided by each.

Table 8–2: 4GL Elements That Simulate Key Presses and Mouse Clicks 

4GL Element

Description

Example
Multi-byte Support
APPLY Statement
Applies an event to a widget or a procedure.
APPLY "CHOOSE" TO 
order-amt IN 
FRAME x. 
The name of the event can contain multi-byte characters.
LASTKEY Function
Returns, as an integer, the key code of the most recent keyboard or mouse event
LASTKEY returns values only after the input method places the data into the keyboard buffer.
IF LASTKEY = 
KEYCODE("F9")... 
The key sequence can be a multi-byte character.
READKEY Statement
Reads one keystroke from an input source and sets the value of LASTKEY to the keystroke’s keycode.
READKEY. 
The key sequence can be a multi-byte character.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095