home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / PROG / MISC / FPC355_3.ZIP / FPCHLP.ZIP / CASE.HLP < prev    next >
Encoding:
Text File  |  1989-05-17  |  1.3 KB  |  38 lines

  1. \ CASE.HLP      Case statment                           by Bob Smith
  2.  
  3.  
  4. CASE            ( -- )
  5.         Start a CASE statment, as follows:
  6.  
  7.                 value1
  8.                 CASE    value2 OF  func2                ENDOF
  9.                         value3 OF  func3                ENDOF
  10.                                    otherwise_func
  11.                                    ( DROP ) <- Not needed as of 05/17/89
  12.                 ENDCASE                     <- Now does the DROP itself.
  13.  
  14.         Allows an arbitrary value to specify a function be performed.
  15.         Value1 is compared agains value2 and value3. The appropriate
  16.         func2, func3, or otherwise_func is performed. If your values
  17.         are sequential, the EXEC: word is much faster, and more space
  18.         efficient.  See also EXEC:
  19.  
  20. ENDOF           ( -- )
  21.                 See CASE.
  22.  
  23. OF              ( n1 n2 -- n1 )  ( n1 n1 -- )
  24.                 See CASE.
  25.  
  26. ENDCASE         ( -- )
  27.                 See CASE.
  28.  
  29. NRESOLVE        ( 0 n1 n2 ... n -- )
  30.                 Primitive used by ENDCASE to resolve the previous case
  31.                 references.
  32.  
  33. (OF)            ( n1 n2 -- n1 )  ( or )  ( n1 n1 -- )
  34.                 Primitive case comparison word, compiled by OF. Performs
  35.                 a comparison between n1 and n2.
  36.  
  37.  
  38.