CTExit()

CTExit()

Uninitializes the CT3 library

Syntax

      CTExit() -> nil

Arguments

none

Returns

nil

Description

The CTExit() function uninitializes the CT3 library. Identical code is declared as EXIT FUNCTION, thus should be executed automatically at the end of the application, but it is a good idea to call it explicitly somewhere at the end of your program to make sure that the deinitialization takes place.

Compliance

CTExit() is a new function in Harbour’s CT3 library.

Platforms

All

Files

Source is ct.prg, library is libct.

Seealso

CTCINIT(), CTINIT(), CTCEXIT()

CTCInit()

CTCInit()

Initializes the CT3 library, C part

Syntax

      CTCInit() -> <lInitialized>

Arguments

None

Returns

<lInitialized> .T. if the function has been correctly initialized

Description

The CTCInit() function initializes the C source part of the CT3 library. Do not call this function directly.

Compliance

CTCInit() is a new function in Harbour’s CT3 library.

Platforms

All

Files

Source is ctc.c, library is libct.

Seealso

CTINIT(), CTEXIT()

CTCExit()

CTCExit()

Uninitializes the CT3 library, C part

Syntax

      CTCExit() -> NIL

Arguments

none

Returns

nil

Description

The CTCExit() function uninitializes the C part of the CT3 library. Do not call this function directly.

Compliance

CTCExit() is a new function in Harbour’s CT3 library.

Platforms

All

Files

Source is ctc.c, library is libct.

Seealso

CTINIT(), CTEXIT()

CSetRef()

CSetRef()

Determine return value of reference sensitive CT3 string functions

Syntax

      CSetRef( [<lNewSwitch>] ) -> lOldSwitch

Arguments

[<lNewSwitch>] .T. -> suppress return value .F. -> do not suppress return value

Returns

lOldSwitch old (if lNewSwitch is a logical value) or current state of the switch

Description

Within the CT3 functions, the following functions do not change the length of a string passed as parameter while transforming this string:

ADDASCII() BLANK() CHARADD() CHARAND() CHARMIRR() CHARNOT() CHAROR() CHARRELREP() CHARREPL() CHARSORT() CHARSWAP() CHARXOR() CRYPT() JUSTLEFT() JUSTRIGHT() POSCHAR() POSREPL() RANGEREPL() REPLALL() REPLLEFT() REPLRIGHT() TOKENLOWER() TOKENUPPER() WORDREPL() WORDSWAP()

Thus, these functions allow to pass the string by reference [@] to the function so that it may not be necessary to return the transformed string. By calling CSetRef (.T.), the above mentioned functions return the value .F. instead of the transformed string if the string is passed by reference to the function. The switch is turned off (.F.) by default.

Compliance

This function is fully CT3 compatible.

Platforms

All

Files

Source is ctstr.c, library is ct3.

Seealso

ADDASCII(), BLANK(), CHARADD(), CHARAND(), CHARMIRR(), CHARNOT(), CHAROR(), CHARRELREP(), CHARREPL(), CHARSORT(), CHARSWAP(), CHARXOR(), CRYPT(), JUSTLEFT(), JUSTRIGHT(), POSCHAR(), POSREPL(), RANGEREPL(), REPLALL(), REPLLEFT(), REPLRIGHT(), TOKENLOWER(), TOKENUPPER(), WORDREPL(), WORDSWAP()

CSetAtMuPa()

CSetAtMuPa()

Determine “multi-pass” behaviour in some string functions

Syntax

      CSetAtMuPa( [<lNewSwitch>] ) -> lOldSwitch

Arguments

[<lNewSwitch>] .T. -> turn “multi-pass” on .F. -> turn “multi-pass” off

Returns

lOldSwitch old (if lNewSwitch is a logical value) or current state of the switch

Description

CSetAtMuPa determines how the following CT3 string functions

ATNUM() AFTERATNUM() BEFORATNUM() ATREPL() NUMAT() ATADJUST() WORDTOCHAR() WORDREPL()

perform their work. See the respective function documentation for a further description how the switch influences these functions.

Compliance

This function is fully CT3 compatible.

Platforms

All

Files

Source is ctstr.c, library is ct3.

Seealso

ATNUM(); AFTERATNUM(); BEFORATNUM(); ATREPL(); NUMAT(); ATADJUST(); WORDTOCHAR(); WORDREPL()

CSetArgErr()

CSetArgErr()

Sets argument error behaviour

Syntax

      CSetArgErr( [<nNewMode>] ) -> <nOldMode>

Arguments

[<nNewMode>] New argument error throwing mode

Returns

<nOldMode> The current or old argument error throwing mode.

Description

All CT3 functions are very compliant in their reaction to wrong parameters. By using the CSetArgErr() function, you can make the library throw an error with the severity <nNewMode>. It is then up to the error handler to substitute the return value. <nNewMode> can be one of the severity modes defined in ct.ch: CT_ARGERR_WHOCARES corresponds to ES_WHOCARES CT_ARGERR_WARNING corresponds to ES_WARNING CT_ARGERR_ERROR corresponds to ES_ERROR CT_ARGERR_CATASTROPHIC corresponds to ES_CATASTROPHIC CT_ARGERR_IGNORE The last is the default behaviour and switches any argument error throwing off.

Compliance

CSetArgErr() is a new function in Harbour’s CT3 library.

Platforms

All

Files

Source is ct.c, library is libct.