Predefined Variables

 

This section describes predefined SilverC variables that describe the SilverScreen operating environment.

These identifiers are available to be used on the right-hand side of expressions in SilverScreen C. They may not appear as the target of an assignment statement. The variables are predefined by SilverScreen C and may not be declared in user programs.

Color variables

int color_black black color number
int color_red red color number
int color_yellow yellow color number
int color_green green color number
int color_cyan cyan color number
int color_blue blue color number
int color_magenta magenta color number
int color_white white color number
int color_brown brown color number
int color_violet violet color number
int color_light_gray light gray color number
int color_gray gray color number
int color_light_blue light blue color number
int color_light_green light green color number
int color_light_cyan light cyan color number
int color_light_red light red color number

Current cursor location

double snap_spacing current snap increment
double worldx x-coordinate
double worldy y-coordinate
double worldz z-coordinate
int window current window number

Screen dimensions

int schar_top top character line in graphics area
int schar_bottom bottom character line in graphics area
int schar_left leftmost character position
int schar_right rightmost character position
int schar_height height of screen, in characters
int schar_width width of screen, in characters
int spixel_height height of screen, in pixels
int spixel_width width of screen, in pixels

Viewing area

int vchar_top top character line
int vchar_bot bottom character line
int vchar_left leftmost character position
int vchar_right rightmost character position
int vpixel_top top pixel
int vpixel_bot bottom pixel
int vpixel_left leftmost pixel
int vpixel_right rightmost pixel

Device information

int char_width width of screen character, in pixels.
int char_height height of screen character, in pixels.

Input device interface

int ich ich is a variable that holds the value of the last keystroke hit. ich may be examined after functions like menu and the prompt_ family.
int multi_right if inchar returns MULTI_KEY (as in pointer mode 1), multi_right contains the number of right arrows (a negative value indicates leftward movement).
int multi_down if inchar returns MULTI_KEY (as in pointer mode 1), multi_left contains the number of down arrows (a negative value indicates upward movement).

Error trapping

int errno errno is a system error number which may be consulted after certain C file operations or math functions. The values taken on by errno are defined in the header file errno.h .
int ss_errno SilverScreen error numbe, set in the case where an error occurs in an embedded script command.

Equality threshold

double epsilon two numbers are considered to be equal by if they are within epsilon of each other. This number is taken from the startup environment.