trm_so()

Purpose

Sends a string to the console

Old name

#define _so trm_so

Syntax

trm_so(string)

Parameters

char* string

Null-terminated string to send to console

Description

The trm_so() function sends a string of characters to the screen. This function is normally only used where maps are not available, (for example it is used by sysdb and userdata), and is occassionally useful for producing diagnostics. You cannot send control characters,including new lines, to the screen with this function - you must use trm_co() instead. The effect produced by mixing calls to trm_so() and trm_co() with calls to higher level functions such as map_draw() and show() is somewhat dependent on the version of DP4 in use.

See also

trm_co(), field_read()

Example

/*
C Functions Reference Manual
----------------------------
Filename: TRM_SO.C
Example: trm_so and trm_co
Purpose: illustrates low level display and
input functions trm_so and trm_co
*/

#include "dp4.h"
#define HELP_LINES 2
static char* help_mess[HELP_LINES] =
{
"This message has been displayed with trm_so",
"and the newline after each line it with trm_co"
};
void process()
{
int i;
for (i = 0; i HELP_LINES; i++)
{
trm_so(help_mess[i]);
trm_co('\n');
}
}