Syntax
void Cursor(
int mode
);
Parameters
- mode
-
[in] Controls the display state of the cursor and specifies the display state at the end of the text.
mode can have one of the following values:Value Description OFF No cursor will be visible. ON The cursor will be a constantly visible underscore. BLINKING The cursor flashes. AUTOWRAP Text is wrapped to the next line, when the end of the line is reached. NOWRAP Text is not wrapped to the next line. Text beyond the end of the line will not be visible.
Return value
None
Remarks
Change the state of the cursor.
If you set an incorrect value, the setting will not be changed.
If you set an incorrect value, the setting will not be changed.
Requirements
Header file:
lib.hLibrary file:
libSTARTUPOPH5000.a
Sample
#include <stdio.h>
#include "lib.h"
void main(void)
{
int c;
Cursor(ON);
printf("\fCursor example");
printf("\nExit:ENT\n");
for(;;)
{
if ((c=getchar())!=EOF)
{
switch(c)
{
case TRIGGER_KEY:
Cursor(OFF);
break;
case Q1_KEY:
Cursor(ON);
break;
case Q2_KEY:
Cursor(BLINKING);
break;
case ENT_KEY:
Cursor(OFF);
return;
default:
GotoXY(0,1);
PrintSymbol(c);
break;
}
}
Idle();
}
}
Last updated: 2020/10/02