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 inMonth DD, YYorMonth 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 intohbmem.chheader 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 allCR/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 functionhb_MemoRead().
Hint: Use either the legacyMemoWrit() / MemoRead()pair of functions or, preferably, the new Harbour functionshb_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 byMRow()andMCol()functions. Visibility of mouse cursor is not affected.
Back to Home
* Copyright Β© 2016βpresent Pete D.