S - Petewg/harbour-core GitHub Wiki

Back to Home

  • SaveScreen([<nTop>], [<nLeft>], [<nBottom>], [<nRight>]) ➜ cScreen
    saves portion or entire screen.

  • Scroll([<nTop>], [<nLeft>], [<nBottom>], [<nRight>], [<nVert>], [<nHoriz>]) ➜ NIL
    scrolls portion or entire screen.

  • Seconds() ➜ nSeconds.hundredths.
    returns the system time as a numeric value in the form sssss.ff (range: 0.00 - 86399.99), which number is in fact, the number of seconds elapsed since midnight, based on a twenty-four hour clock.

  • Secs( <cTime> ) ➜ nSeconds
    converts <cTime> to seconds (integer). For empty or invalid <cTime> returns 0.

  • Select([<cAlias>]) ➜ nWorkArea
    returns the number of workarea with the given <cAlias>. If no <cAlias> specified, the currently selected work area number is returned or 1 if none selected (used). If a <cAlias> is given but it doesn't exist or is invalid, function returns 0 zero.
    NOTE: The Select(<cAlias>) function does NOT select the <cAlias> workarea, (i.e., does not change current workarea), it just retrieves and return its number (if any).
    Yet, it can be easily confused (but must not!) with SELECT command.
    For example:

    USE sales SHARED NEW
    USE customers SHARED NEW
    ? Alias() // --> "customers"
    // using Select() function 
    ? Select( "sales" ) // --> 1
    // current workarea didn't change
    ? Alias() // --> "customers"
    // using SELECT command to change current workarea
    SELECT ("sales")
    ? Alias() // --> "sales"
  • Set(<nSpecifier>, [<expNewSetting>], [<lOpenMode>]) ➜ lCurrentSetting
    Inspects and / or changes a system setting; returns the current (old) setting.
    Refer to set.ch header file for (plenty of) available settings.
    In fact, to document all settings (or at least the most significant of them), this function requires a separate page! (currently started here)

  • SetBlink([<lToggle>]) ➜ lCurrentSetting
    toggles blink state by changes the meaning of the asterisk (*) in a color string. When .T. blinking is on, when .F. background intensity is on. (Default=.T.)

  • SetCancel([<lToggle>]) ➜ lCurrentSetting

  • SetColor([<cColorString>]) ➜ cCurrentColor

  • SetCursor([<nCursorShape>]) ➜ nCurrentSetting

  • SetKey(<nInkeyCode>, [<bAction>]) ➜ bCurrentAction

  • SetMode(<nRows>, <nCols>) ➜ lSuccess

  • SetPos(<nRow>, <nCol>) ➜ NIL

  • SetPrc(<nRow>, <nCol>) ➜ NIL

  • SoundEx(<cString>) ➜ cSoundExString
    converts <cString> to a four-character code used to find similar-sounding words or names. The first character of the code is the first character of <cString> and the rest three are coded numbers. Vowels are ignored unless they are the first letter of the string. It's possibly useful function to search for sound-alike english words. Does NOT support characters with codes above 127 in ASCII table.

  • Space( <nNumber> ) ➜ cSpaceChars
    returns a string that contains nNumber space character(s) (ASCII character 32).

  • Sqrt( <nNumber> ) ➜ nSquareRoot
    returns the square root of <nNumber>. The precision of this evaluation is based solely on the settings of the SET DECIMAL TO command. Any negative number passed as <nNumber> will always return a 0.

  • StoD( [<cDate>] ) ➜ dDate
    converts a date string to date value formatted as yyyymmdd.

  • Str(<nNumber>, [<nLength>], [<nDecimals>]) ➜ cNumber
    converts a numeric expression <nNumber> to a character string.
    <nLength> is the length of the character string to return, including decimal digits, decimal point, and sign. <nDecimals> is the number of decimal places to return.

  • StrTran(<cString>, <cFindString>, [<cReplaceWith>], [<nStart>], [<nOccurences>]) ➜ cNewString
    it searches into <cString> for any occurrence of <cFindString>, and replaces it with <cReplaceWith>. If <cRepLaceWith> is not specified, a NULL byte will replace the <cFindString> or in other words the <cFindString> will be removed. <nStart> is the starting occurrence to be replaced (default is 1st occurence). <nOccurrences> is the number of occurrences to be replaced (default is all occurences).

  • StrZero( <nNumber>, [<nLength>], [<nDecimals>] ) ➜ cNumber
    converts a numeric expression <nNumber> to a character string, padded with leading zero(s).
    <nNumber> is the numeric expression to be converted to a character string. <nLength> is the length of the character string to return, including decimal digits, decimal point, and sign. <nDecimals> is the number of decimal places to return.

  • Stuff(<cString>, <nStart>, <nDelete>, <cInsert>) ➜ cNewString
    inserts and/or deletes characters in a string. Basically, inserts <cInsert> character(s) at position <nPos> and concurrently deletes <nDelete> character(s) starting from <nStart> and beyond. Evidently, if <nDelete is 0 no character is deleted. Likewise if <cInsert> is null string "", nothing is inserted.

  • SubStr(<cString>, <nStart>, [<nCount>]) ➜ cSubstring
    returns a sub-string extracted from the string <cString>. <nStart> is the position of <cString> from which it'll start. <nCount> is the number of characters to be returned and if not given, all characters from <nStart> up to the end of <cString> will be returned.

Back to Home

⚠️ **GitHub.com Fallback** ⚠️