C Language Development Kit/Functions/GetIndicator
From OptiWiki
< C Language Development Kit | Functions(Redirected from C Language Development Kit/Functions/Getindicator)
| Description | This function retrieves the state of various screen indicators. | ||||||
| Syntax | int getindicator(int indicator); | ||||||
| Arguments | indicator is the screen indicator of which one wants to know the state. It can be specified as one of the following values, shown here in the order as they appear on top of the display (the shape of the indicator is shown left of the indicator value):
int indicator
| ||||||
| Returns |
| ||||||
| Remarks | None | ||||||
| Example | #include "lib.h" #include <stdio.h> void main( void ) { int key; printf("\fQ1 = batt state\nQ2 = b/u batt\n"); resetkey(); while( 1 ) { if( (key = getchar()) != EOF) { resetkey(); sound( TSTANDARD, VHIGH, SHIGH, 0); switch( key ) { case Q1_KEY: if( getindicator( BATTERY_SIGN_COL ) == OFF) printf("\fbattery = OK"); else printf("\fbattery = LOW"); break; case Q2_KEY: if( getindicator( BU_BATTERY_SIGN_COL ) == OFF) printf("\fb/u batt = OK"); else printf("\fb/u batt = LOW"); break; default: printf("\fQ1 = batt state\nQ2 = b/u batt\n"); break; } } idle(); } } |
