Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - c_vinit() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 C_VINIT()

 DESCRIPTION

 The C_VINIT() function initializes the public memory variables
 created by C_VPUBLIC() to their empty values.  C_VINIT()
 initializes all data types to their correct empty values.

 NOTES

 The C_VPUBLIC() function must be called first before any other
 ClipOn database memory variable function.

 SYNTAX

 C_VINIT([prefix])

 PARAMETERS

 prefix (C) is the prefix string originally specified for C_VPUBLIC() when
 the public memory variables were created.  If prefix is not specified,
 the default of no prefix is used.

 RETURNS

 C_VINIT() returns true (.T.) if all memory variables are
 successfully initialized, or false (.F.) if an error occurs.

 EXAMPLES

 && (Test.dbf has fields: name, addr, city, state, amount)
 use test             && Use test.dbf and add new records in a loop

 c_vpublic("M_")      && Create memory variables with "M_" prefix

 do while .t.
   c_vinit("M_")      && Initialize memory variables to empty
 values
   @ 1,1 say "Enter Name:    " get m_name
   @ 2,1 say "Enter Address: " get m_addr     && Get data from user
   @ 3,1 say "Enter City:    " get m_city
   @ 4,1 say "Enter State:   " get m_state
   @ 5,1 say "Enter Amount:  " get m_amount picture "99,999.99"
   read
   if lastkey() = 27
     exit
   endif
   append blank        && Add new record
   c_vreplace("M_")    && Replace memory variables into database
 enddo
 c_vrelease("M_")      && Release public memory variables


See Also: C_VPUBLIC() C_VSTORE() C_VREPLACE() C_VRELEASE()

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