# RegisterBrng

Registers user-defined basic generator.

## Syntax

Fortran:

brng = vslregisterbrng( properties )

C:

brng = vslRegisterBrng( &properties );

## Description

An example of a registration procedure can be found in the respective directory of VSL examples.

## Input Parameters

Name | Type | Description
--- | --- | ---
properties | FORTRAN: TYPE(VSL_BRNG_PROPERTIES), INTENT(IN) C: VSLBRngProperties* | Pointer to the structure containing properties of the basic generator to be registered

## Output Parameters

Name | Type | Description
--- | --- | ---
brng | FORTRAN: INTEGER, INTENT(OUT) C: int | Number (index) of the registered basic generator; used for identification. Negative values indicate the registration error.

## Return Values

VSL_ERROR_OK, VSL_STATUS_OK
  Indicates no error, execution is successful.
VSL_ERROR_BRNG_TABLE_FULL
  Registration cannot be completed due to lack of free entries in the table of registered BRNGs.
VSL_ERROR_BAD_STREAM_STATE_SIZE

  Bad value in StreamStateSize field.

VSL_ERROR_BAD_WORD_SIZE

  Bad value in WordSize field.

VSL_ERROR_BAD_NSEEDS

  Bad value in NSeeds field.

VSL_ERROR_BAD_NBITS

  Bad value in NBits field.

VSL_ERROR_NULL_PTR

  At least one of the fields iBrng, dBrng, sBrng or InitStream is a NULL pointer.

Parent topic: Advanced Service Routines