C Language Development Kit/Functions/SetTerminalId

From OptiWiki

Jump to: navigation, search
Description setterminalid sets the id of the terminal. This can also be done in the system menu, but this function can be used to set the id in the program. The id can be read with the function getterminalid().
void setterminalid(unsigned int id);
unsigned int id
The new value for the terminal id. The value must be smaller then 10000.
Returns None
Remarks To read the terminal id, use the function getterminalid().

Passing a value of 10000 or larger will result in undefined behavior.

How to activate the system menu can be read here.

#include "lib.h"
#include <stdio.h>
void main( void )
    setterminalid( 1234 );
    printf("\fterminal ID\n%d", getterminalid() );
    while( 1 )

Personal tools