Day()

 

DAY()

Return the numeric day of the month.

Syntax

      DAY(<cDate>) --> nMonth

Arguments

<cDate> Any valid date expression.

Returns

<nMonth> Numeric value of the day of month.

Description

This function returns the numeric value of the day of month from a date.

Examples

      ? Day( Date() )
      ? Day( Date() + 6325 )

Compliance

Clipper

Platforms

All

Files

Library is rtl

Seealso

CTOD(), DTOS(), DTOC(), DATE(), MONTH(), CMONTH()

Date()

 

DATE()

 

Return the Current OS Date

Syntax

      DATE() --> dCurDate

Arguments

None

Returns

<dCurDate> Current system date.

Description

This function returns the current system date.

Examples

      ? Date()

Tests

      ? "Today is ",Day(Date())," of ",cMonth(Date())," of ",Year(Date())

Compliance

Clipper

Platforms

All

Files

Library is rtl

Seealso

CTOD(), DTOS(), DTOC(), DAY(), MONTH(), CMONTH()

CToD()

 

CTOD()

Converts a character string to a date expression

Syntax

      CTOD(<cDateString>)  --> dDate

Arguments

<cDateString> A character date in format ‘mm/dd/yy’

Returns

<dDate> A date expression

Description

This function converts a date that has been entered as a character expression to a date expression. The character expression will be in the form “MM/DD/YY” (based on the default value in SET DATE) or in the appropriate format specified by the SET DATE TO command. If an improper character string is passed to the function, an empty date value will be returned.

Examples

      ? CToD( "12/21/00" )

Compliance

Clipper

Platforms

All

Files

Library is rtl

Seealso

SET DATE, DATE(), DTOS()

CMonth()

 

CMONTH()

Return the name of the month.

Syntax

      CMONTH(<dDate>)  --> cMonth

Arguments

<dDate> Any date expression.

Returns

<cMonth> The current month name

Description

This function returns the name of the month (January, February, etc.) from a date expression <dDate> passed to it. If a NULL date is passed to the function, the value of the function will be a NULL byte.

Examples

      ? CMonth( Date() )
      IF CMonth( Date() + 10 ) =="March"
         ? "Have you done your system BACKUP?"
      ENDIF

Compliance

Clipper

Platforms

All

Files

Library is rtl

Seealso

CDOW(), DATE(), MONTH(), YEAR(), DOW(), DTOC()

CDoW()

 

CDOW()

Converts a date to the day of week

Syntax

      CDOW(<dDate>)  --> cDay

Arguments

<dDate> Any date expression.

Returns

<cDay> The current day of week.

Description

This function returns a character string of the day of the week, from a date expression <dDate> passed to it. If a NULL date is passed to the function, the value of the function will be a NULL byte.

Examples

      ? CDOW( Date() )
      IF CDOW( Date() + 10 ) == "Sunday"
         ? "This is a sunny day."
      ENDIF

Compliance

Clipper

Platforms

All

Files

Library is rtl

Seealso

DAY(), DOW(), DATE(), CMONTH()

SAVE SCREEN

SAVE SCREEN

Save whole screen image and coordinate to an internal buffer

Syntax

      SAVE SCREEN

Arguments

none.

Description

SAVE SCREEN save the image of the whole screen into an internal buffer, it also save current cursor position. The information could later be restored by REST SCREEN. Each call to SAVE SCREEN overwrite the internal buffer.

SAVE SCREEN command is preprocessed into __XSaveScreen() function during compile time. Note that SAVE SCREEN TO is preprocessed into SaveScreen() function.

Examples

      // save the screen,  display list of files than restore the screen
      SAVE SCREEN
      DIR *.*
      WAIT
      RESTORE SCREEN

Compliance

Clipper

Platforms

All(GT)

Seealso

RESTORE SCREEN, __XRestScreen(), __XSaveScreen()

Row()

ROW()

Returns the current screen row position

Syntax

      ROW()  --> nPosition

Arguments

None.

Returns

<nPosition> Current screen row position

Description

This function returns the current cursor row location. The value for this function can range between 0 and MAXCOL().

Examples

      ? Row()

Compliance

Clipper

Platforms

All

Files

Library is rtl

Seealso

COL(), MAXROW(), MAXCOL()

RESTORE SCREEN

RESTORE SCREEN

Restore screen image and coordinate from an internal buffer

Syntax

      RESTORE SCREEN

Arguments

none.

Description

Rest Screen restore saved image of the whole screen from an internal buffer that was saved by Save Screen, it also restore cursor position. After a call to Rest Screen the internal buffer is cleared.

RESTORE SCREEN command is preprocessed into __XRestScreen() function during compile time. Note that RESTORE SCREEN FROM is preprocessed into RESTSCREEN() function.

Examples

      // save the screen, display list of files than restore the screen
      SAVE SCREEN
      DIR *.*
      WAIT
      RESTORE SCREEN

Compliance

Clipper

Platforms

All (GT)

Seealso

__XRESTSCREEN(), SAVE SCREEN, __XSAVESCREEN()

OutStd()

OUTSTD()

Write a list of values to the standard output device

Syntax

      OUTSTD( <xExp,...> )

Arguments

<xExp, …> is a list of expressions to display. Expressions are any mixture of Harbour data types.

Description

OUTSTD() write one or more values into the standard output device. Character and Memo values are printed as is, Dates are printed according to the SET DATE FORMAT, Numeric values are converted to strings, Logical values are printed as .T. or .F., NIL are printed as NIL, values of any other kind are printed as empty string. There is one space separating each two values. Note that Numeric value can take varying length when converted into string depending on its source (see STR() for detail).

OUTSTD() is similar to QQOUT() with the different that QQOUT() send its output to the Harbour console stream, which can or can not be redirected according with the screen driver, and OUTSTD() send its output to the standard output device (STDOUT) and can be redirected.

Examples

      OUTSTD( "Hello" )            // Result: Hello

      OUTSTD( 1, .T., NIL, "A" )
      OUTSTD( "B" )                // Result:          1 .T. NIL AB

Compliance

Clipper

Files

Library is rtl

Seealso

?, ??, DEVOUT(), DEVOUTPICT(), DISPOUT(), DISPOUTAT(), OUTERR(), QOUT(), QQOUT(), STR()

OutErr()

OUTERR()

Write a list of values to the standard error device

Syntax

      OUTERR( <xExp,...> )

Arguments

<xExp, …> is a list of expressions to display. Expressions are any mixture of Harbour data types.

Description

OUTERR() write one or more values into the standard error device. Character and Memo values are printed as is, Dates are printed according to the SET DATE FORMAT, Numeric values are converted to strings, Logical values are printed as .T. or .F., NIL are printed as NIL, values of any other kind are printed as empty string. There is one space separating each two values. Note that Numeric value can take varying length when converted into string depending on its source (see STR() for detail).

There is an undocumented CA-Cl*pper command line switch //STDERR which can set the file handle to write output from OUTERR(). If not specified the default STDERR is used, //STDERR or //STDERR:0 set OUTERR() to output to the same file handle as OUTSTD(), //STDERR:n set output to file handle n. Like other undocumented features this switch is available only if src/rtl/console.c was compiled with the HB_CLP_UNDOC flag.

Examples

      // write error log information
      OUTERR( DATE(), TIME(), "Core meltdown detected" )

Compliance

Clipper

Files

Library is rtl

Seealso

?, ??, DEVOUT(), DEVOUTPICT(), DISPOUT(), DISPOUTAT(), OUTSTD(), QOUT(), QQOUT(), STR()