Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SuperLib 3.50 - function calcwhen() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FUNCTION CALCWHEN()

  Short:
  ------
  CALCWHEN() Uses GETCALC() calculator function as a GET WHEN
  clause

  Returns:
  --------
  <lWhen> => when condition

  Syntax:
  -------
  CALCWHEN([lShowonUp],[lReturn])

  Description:
  ------------
  This sets up the popup GETCALC() calculator for use
  in a GET WHEN clause. (the pre validation block). If a value is
  selected, it is assigned to the get. (if ESCAPE is pressed, it
  is no) The Calculator function will pop up upon entry into a GET
  field.

  [lShowOnUp] Normally you wouldn't want this WHEN to
  occur if the user is using the up arrow, and if <lShowOnUp> is
  .f. (the default) it does not occur (the GET is just skipped)

  [lReturn] If set to False (the default) the GET is
  never actually edited, as the WHEN will always return .f., but
  it is assigned the value returned by GETCALC(). By setting it to
  True, the Calculator will pop up, and then the GET will also be
  put thorugh the normal get editor.

  Examples:
  ---------

   proc test

   v1 := 10
   v2 := 10
   v3 := 10
   v4 := 10

   @10,10 get v1
   @11,10 get v2 when calcwhen(.f.)   // calculator pops up  when
                                   // get is entered. No  direct
                                   // editing.
   @12,10 get v3 valid calcvalid(  {||v3>0}  )
   @13,10 get v4

   read

  Notes:
  -------
  You might want to look at CALCVALID() and CALCKSET()
  for other options.

  Source:
  -------
  S_CALCVW.PRG


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