Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Protection Plus for Clipper - <u>pp_nexptype()</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
PP_NEXPTYPE()
Reset the expiration type and date/exe limit
------------------------------------------------------------------------------

Syntax
  PP_NEXPTYPE( <sType>, <dData> OR <nData> )
             .  lResult

Arguments
  <sType> is the new expiration type.
  <dData> OR <nData> is the data associated with the expiration
  type.

Returns
  .T. if successful, else .F.

Description
  Resets the expire type to the <sType> given.  Depending on
  what the value of <sType> is, sets other applicable data.
  <sType> must be upper-case!

TYPE      DATA
<P>aymentsDATE of next payment (expiration)
<D>emo    DATE of expiration
<E>xe countNUMBER (numeric) of executions allowed

  Note that <N> is not a choice.  To set expiration type to "N",
  use the pp_unlock() function.  This is also used to reset the
  expiration date.  Also note that when the type is changed to
  <E>, the expiration date field is blanked and the execution
  counter is zeroed.  When the type is changed to <P> or <D>,
  the execution limit and counter is zeroed.  This could be one of
  the hidden user-codes.  Refer to PP_UCODE() for information
  on how to integrate this.

Example

*Set next expiration type to <P>ayments and make it expire on
*the next payment date around the 20th of next month

if pp_nexptype("P",pp_npdate(date(),20))
    @ 2,0 say "Application payment expire date extended to"+;
        dtoc(pp_npdate(date(),20))
endif

-OR-

*Set the next expiration type to <D>emo and make it expire on
*12/31/91

if pp_nexptype("D",ctod("12/31/91"))
    @ 2,0 say "Application demo expire date set to 12/31/91"
endif

See Also: PP_EXPIRED() PP_UNLOCK() PP_NPDATE() PP_EXPDATE() PP_UCODE()

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