DBconvertToCoordinates

Top  Previous  Next

An input text convert into a co-ordinate.

This routine receives a text and a data bank as an input and delivers the co-ordinates of a point and the connecting information as an issue. Besides, the co-ordinates are rounded on the grid invested with Grid if such is defined. If a conversion mistake appears, it does not concern with the text a co-ordinate, then the function delivers a value incomparably ERROR_OK otherwise just ERROR_OK.

Parametre

root (PROOT) [IN]

The trading of the data bank.

text (char *) [IN]

This is the text to be converted. He lies in the form

#<left> <x> <y>

before and left one of the sign chains "P", "L", "C", "R", "CON", "RPT", "CLS" and "IBID." is. x and y are floating decimal point figures.

feels (int *) [(IN) / OUT]

Here the connecting information is stored away.

LINK_P with #P

LINK_L with #L

LINK_R with #R

LINK_C with #C

LINK_CON with #CON or #N

LINK_CLS with #CLS or #S

LINK_EBD with #EBD or #E

LINK_RPT with #RPT or #T

0 with a conversion mistake.

x (stands in *) [(IN) / OUT]

y (stands in *) [(IN) / OUT]

Here the position is filed.

cp (PCOORDINATE_PARAMETER) [IN / OUT]

cp may be a ZERO. If is cp incomparably ZERO, it is used to the return of the z co-ordinate and the number of the detailed window, as far as the text contains them. cp->valid must be initialized before the call with 0, cp->len with the length structs.

If the text contains a z co-ordinate, her value >is returned in cp->z and (cp->valid& COORDINATE_PARAMETER_VALID_Z) is TRUE.

If the text contains a window number - e.g., WNR / 2 - her value >is returned in cp->windowNr, and the following expression is TRUE: (cp->valid& COORDINATE_PARAMETER_VALID_WINDOW_NR)

Result

(int) [OUT]

ERROR_OK (0) if everything has gone well.

incomparably 0, otherwise.

Declaration

#include "database.h"

 

int DLLENTRY DBconvertToCoordinates (

PROOT root,

char * text,

int * feels,

stand in * x,

stand in * y,

PCOORDINATE_PARAMETER cp

);