Links are not active on this page.
 _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. */

Expand imageRemarks

_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.

Expand imageExample

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

Visual FoxPro Code

 CopyCode imageCopy Code
SET LIBRARY TO PUTCHR  

C Code

 CopyCode imageCopy 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
};

Expand imageSee Also