home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l216 / 2.ddi / XVIRTUAL.PRO < prev    next >
Encoding:
Text File  |  1987-03-23  |  1.3 KB  |  53 lines

  1. /*******************************************************************
  2.  
  3.      Turbo Prolog Toolbox
  4.      (C) Copyright 1987 Borland International.
  5.  
  6.         Demo of the virtual screen handler
  7. *******************************************************************/
  8.  
  9. code=1500
  10.  
  11. include "tdoms.pro"
  12.  
  13. DOMAINS
  14.   FNAME=SYMBOL
  15.   TYPE = int(); str(); real()
  16.  
  17. DATABASE
  18.   /* Database declarations used in scrhnd */
  19.   insmode            /* Global insertmode */
  20.   actfield(FNAME)        /* Actual field */
  21.   screen(SYMBOL,DBASEDOM)    /* Saving different screens */
  22.   value(FNAME,STRING)        /* value of a field */
  23.   field(FNAME,TYPE,ROW,COL,LEN) /* Screen definition */
  24.   txtfield(ROW,COL,LEN,STRING)
  25.   windowsize(ROW,COL).
  26.   notopline
  27.  
  28.   /* Database declarations used in vscrhnd */
  29.   windowstart(ROW,COL)
  30.   mycursord(ROW,COL)
  31.  
  32.   /* Database declarations used in lineinp */
  33.   lineinpstate(STRING,COL)
  34.   lineinpflag
  35.  
  36. include "tpreds.pro"
  37. include "menu.pro"
  38. include "status.pro"
  39. include "lineinp.pro"
  40. include "vscrhnd.pro"
  41.  
  42. CLAUSES
  43.   /* Use default definitions for the screen predicates */
  44.   field_action(_):-fail.
  45.   field_value(FNAME,VAL):-value(FNAME,VAL),!.
  46.   noinput(_):-fail.
  47.  
  48. GOAL
  49.      consult("xvirtual.scr"),    /* Load the screen definition */
  50.     createwindow(on),        /* Make the window */
  51.     makestatus(112," Type in some values"),
  52.     scrhnd(on,_).            /* Call screen handler */
  53.