Condividi tramite


_PutChr( ) API Library Routine

Displays the one character char at the output position in the current output window in its normal attribute (color 0).

void _PutChr(int char)
int char;                     /* Character to display. */

Remarks

_PutChr( ) treats special characters such as newline, carriage return, and bell as control characters and doesn't display them on the screen.

To display the character that corresponds to one of these control characters, add 256 to the value of the character.

For more information on how to create an API library and integrate it with Visual FoxPro, see Accessing the Visual FoxPro API.

Example

The following example uses _PutChr( ) to display all 8-bit characters on the screen.

Visual FoxPro Code

SET LIBRARY TO PUTCHR  

C Code

#include <pro_ext.h>

FAR Example(ParamBlk FAR *parm)
{
   int ch;

   for (ch = 0; ch < 256; ch++)
   {
      _PutChr(ch);
   }
}

FoxInfo myFoxInfo[] = {
   {"PUTCHR", (FPFI) Example, CALLONLOAD, ""},
};
FoxTable _FoxTable = {
   (FoxTable FAR *) 0, sizeof(myFoxInfo)/sizeof(FoxInfo), myFoxInfo
};

See Also

Concepts

API Library Routines A-Z

Reference

_PutStr( ) API Library Routine

_PutValue( ) API Library Routine

Other Resources

Accessing the Visual FoxPro API

API Library Routines by Category