Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - mput() insert text into a memo http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 mput()              Insert text into a memo
------------------------------------------------------------------------------
 Declaration
   memo.hdr

 Syntax
   proc mput extern
   param       memo mMemoField, ;
         const char cText

 Arguments
   mMemoField is the memo to operate on.
   cText is the string to add to the memo.

 Return
   None.

 Description
   The mput() procedure inserts cText into mMemoField. Carriage return
   and line-feed characters are NOT prepended or appended to cText.
   All characters from cText are placed into mMemoField until a NULL
   is encountered.

   mMemoField must have been opened in the MO_WRITE or MO_append mode.

   The mput() procedure allows more control over the output string. Because
   carriage-return and line-feed characters are not prepended or appended,
   mput() allows for better string formatting, if required. Use mput() in
   these cases:

   (1) Several lines are to be output to the memo field as one single
   line, but it is NOT known at runtime where the lines originate.

   (2) Some utilities require carriage-return line-feed characters to be
   at the end of the line, versus the beginning.

 Example
   #define EXAMPLE_DATABASE
   #include example.hdr

   proc Test_mput
   open sTest
   mopen( sTest->notes, MO_CREATE )
   mputln( sTest->notes, "mputln()" ) // new line and text added
   mput( sTest->notes, "mput()" )     // only text added
   #pragma ESCSEQ+
   mput( sTest->notes, "\r" )         // new line added via string
   mclose( sTest->notes )
   ShowMemo( sTest->notes )
   endproc

   proc main
   Test_mput()
   endproc

See Also: mputln()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson