M - Petewg/harbour-core GitHub Wiki

Back to Home

  • Max(<xExp1>, <xExp2>) ➜ xLarger
    returns the larger numeric, date, datetime or logic value. On logic value larger is .T.

  • MaxCol() ➜ nColumn

  • MaxRow() ➜ nRow

  • MCol() ➜ nMouseColumn
    returns the mouse cursor's screen column position.

  • MDY( [<dDate>] ) ➜ cDateString
    returns the date as a string in Month DD, YY or Month DD, YYYY. If <dDate> is NULL, the system date is used.

  • MemoEdit(<cString>, [<nTop>], [<nLeft>], [<nBottom>], [<nRight>], [<lEditMode>], [<cUserFunction>], [<nLineLength>], [<nTabSize>], [<TextBufferRow>], [<nTextBufferColumn>], [<nWindowRow>], [<nWindowColumn>]) ➜ cTextBuffer

  • MemoLine(<cString>, [<nLineLength>], [<nLineNumber>], [<nTabSize>], [<lWrap>], [<cEOL>|<acEOLs>], [<lPad>]) ➜ cLine
    extracts the <nLineNumber> line from <cString>.
    Default values for optional parameters: <nLineLength>=79, <nLineNumber>=1, <nTabSize>=4, <lWrap>=.T., <cEOL>|acEOLs>=??, <lPad>=.T.
    The <cEOL>|acEOLs> and <lPad> parameters are Harbour extensions.
    (I can only guess that with <cEOL>|acEOLs> one can specify custom EOLs to be used by the function in determining lines.)

  • MemoRead( <cFileName> ) ➜ cString
    Returns the contents of <cFileName> (file of any size limited only by system memory rersouces) as a character string or empty string if <cFileName> not found. If <cFileName> does not contain a path, only the current directory is searched, (SET DEFAULT or SET PATH are ignored). NOTE: {EOF} character, if it exists into the read <cFileName> file, is ignored (i.e. it does not attached at the end of restored cString)

  • Memory( <nType> ) ➜ nKBytes
    returns an integer value representing (in Kbytes) the amount of memory used/available. The returned memory type, is determined by <nType>. Constants for various memory types, are defined into hbmem.ch header file. Note that some of the defined types, may not supported on all platforms.

  • MemoTran(<cString>, [<cReplaceHardCR>], [<cReplaceSoftCR>]) ➜ cNewString
    returns a copy of <cString> where all CR/LF (carriage return / line feed) pairs are replaced. If <cReplaceHardCR> not specified defaults to semicolon. If <cReplaceSoftCR> not specified, defaults to single space.

  • MemoWrit( <cFileName>, <cString> ) ➜ lSuccess
    writes (or save) a memo field or character string to a text file on disk. If not specified a path, <cFileName> is written to the current directory (ignores SET DEFAULT). If <cFileName> already exists, it is overwritten.
    NOTE: this function always adds an {EOF} character (Chr(26)) at the end of the created file. In some cases this redundant char could cause troubles, particularly when restoring the original string by using newer Harbour function hb_MemoRead().
    Hint: Use either the legacy MemoWrit() / MemoRead() pair of functions or, preferably, the new Harbour functions hb_MemoWrit() / hb_MemoRead() but never a mixture of them! They're not safely interchangeable, due to their mentioned incompatibility.

  • MemvarBlock(<cMemvarName>) ➜ bMemvarBlock
    returns a set-get code block for a given memory variable.

  • MLCount(<cString>, [<nLineLength>], [<nTabSize>], [<lWrap>], [<cEOL>|<acEOLs>]) ➜ nLines
    returns the number of lines of <cString>, according to <nLineLength>, <nTabSize>, <lWrap> and <cEOL> or <acEOLs> optional parammeters.
    Default values for optional parammeters when not given: <nLineLength>=79, <nTabSize>=4, <lWrap>=.T., <cEOL>|<acEOLs>]=?? (OS_EOL?).
    The <cEOL>|acEOLs> parameter is a Harbour extension (not exists in Cl*pper).

  • MLCToPos(<cText>, <nWidth>, <nLine>, <nCol>, [<nTabSize>], [<lWrap>]) ➜ nPosition

  • MLPos(<cString>, <nLineLenght>, <nLine>, [<nTabSize>], [<lWrap>]) ➜ nPosition

  • MPresent() -➜ lIsPresent
    returns true if a mouse is present; otherwise, blame cat..

  • Mod( <nNumber1>, <nNumber2> ) ➜ nRemainder
    returns the remainder of the division of <nNumber1> by <nNumber2>.
    NOTE: Mod() is a compatibility function and therefore not recommended. It is superseded entirely by the modulus operator %.

  // instead of:
  nRemainder := Mod( 3 / 5) 
  // prefer to use 
  nRemainder := (3 % 5)
  • Month(<dDate>) ➜ nMonth
    returns an integer numeric value in the range of zero to 12. A null <dDate> returns zero.

  • MPosToLC(<cText>, <nWidth>, <nPos>, [<nTabSize>], [<lWrap>]) ➜ aLineColumn
    returns an array containing the line and the column values for the specified <nPos> byte position.

  • MRow() ➜ nMouseRow
    returns the mouse cursor's screen row position.

  • MRightDown() ➜ lIsPressed returns true if the mouse's right button is currently pressed, otherwise, false.

  • MSetCursor([<lVisible>]) ➜ lIsVisible
    Set/get mouse visibility. The value of optional argument <lVisible> affects the visibility of mouse cursor; if it's TRUE (.T.) the cursor is shown otherwise if it's FALSE (.F.) the mouse cursor is hidden. Returns the previous (or current, if no change made) visibility state of mouse cursor.

  • MSetPos(<nRow>, <nCol>) ➜ NIL
    changes the position of the mouse cursor to the new coordinates specified by <nRow> and <nCol> arguments.
    It also updates the the values returned by MRow() and MCol() functions. Visibility of mouse cursor is not affected.

Back to Home

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