Ascii

From Bennu Wiki
Revision as of 06:11, 27 October 2014 by Kloppix (talk | contribs) (Created page with "category:variables category:predefined category:global variables category:mod_key '''Up to Global Variables''' ---- == Definition == ''...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Up to Global Variables


Definition

INT ascii

Ascii is defined in the module mod_key and, in contrast to scan_code, it contains the last character typed on the keyboard instead of the last key. That means “A” and “a” will have the same scan_code, but different ascii value.

Example

import "mod_text"
import "mod_key"
import "mod_video"

process main()
begin
    set_mode(640,320);

    write( 0, 60, 10, 0, "Use lower and upper case characters to see the difference");
    write( 0, 60, 20, 0, "between ascii and scan_code.    (ESC to exit)  ");

    write( 0, 60, 40, 0, "ascii: ");
    write_var( 0, 110, 40, 0, ascii);

    write( 0, 26, 50, 0, "scan_code: ");
    write_var( 0, 110, 50, 0, scan_code);

    while ( !key(_esc))
        frame;
    end
end   


Global variables
ArgcArgvAsciiCdinfoDump_typeExit_statusFadingFileinfoFocus_statusFpsFrame_timeFull_screenGraph_modeM7MouseMouse_statusOs_idRegex_regRestore_typeScale_modeScale_resolutionScale_resolution_aspectratioScale_resolution_orientationScan_codeScrollShift_statusSound_channelsSound_freqSound_modeText_flagsText_zTimerWindow_status