[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+---------+################################################################
#+-| M_EOF() |-------------------------------------------------------+########
#| +---------+ Returns TRUE if memo read/write pointer is at the end |########
#+-------------------------------------------------------------------+########
##############################################################################
##############################################################################
#+--| Summary |--------------+################################################
#| #INCLUDE memo.hdr |################################################
#+---------------------------+################################################
##############################################################################
##############################################################################
#+--| Syntax |------------------------------+#################################
#| FUNCTION LOGICAL m_eof PROTOTYPE |#################################
#| PARAMETERS MEMO memo_field |#################################
#+------------------------------------------+#################################
##############################################################################
##############################################################################
###########+---| Description |-------------------------------------+##########
###########| The m_eof() function returns TRUE if the current memo |##########
###########| read/write pointer is at the end of memo_field. |##########
###########+-------------------------------------------------------+##########
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Search through a memo for a string. |#########
#########| |#########
#########| m_open( memo_name, &M_READ ) |#########
#########| DO WHILE .NOT. m_eof( memo_name ) |#########
#########| m_getln( memo_name ) |#########
#########| IF "Corina" $ memo_line |#########
#########| m_close( memo_name ) |#########
#########| RETURN .T. |#########
#########| ENDIF |#########
#########| ENDDO |#########
#########| m_close( memo_name ) |#########
#########| RETURN .F. |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * A generic "search for a string in a memo" function. |#########
#########| * Searches any database, any memo field. |#########
#########| |#########
#########| FUNCTION CHAR find_memo |#########
#########| PARAMETERS ALIAS a, MEMO m, CONST CHAR s |#########
#########| VARDEF |#########
#########| CHAR memo_line |#########
#########| ENDDEF |#########
#########| !a GOTO TOP |#########
#########| m_open( m, &M_READ ) |#########
#########| DO WHILE .NOT. a_eof( m ) |#########
#########| m_getln( m, memo_line ) |#########
#########| IF s $ memo_line |#########
#########| m_close( m ) |#########
#########| RETURN memo_line |#########
#########| ENDIF |#########
#########| !a SKIP |#########
#########| ENDDO |#########
#########| m_close( m ) |#########
#########| RETURN "" |#########
#########| ENDPRO |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
m_close
m_edit
m_exist()
m_getln
m_open
...
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson