NUMINPUT.LST 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. Listing:
  2. 1 DEFINITION MODULE NumInput;
  3. 2 (*
  4. 3 * REPERTOIRE
  5. 4 * Release 1.6
  6. 5 * By Charles Bradford and Cole Brecheen
  7. 6 * (c) Copyright 1985-1992 PMI
  8. 7 * Green Bay, Wisconsin
  9. 8 * All rights reserved
  10. 9 * (414) 468-6040
  11. 10 *
  12. 11 * $Header: D:/logfiles/defs/numinput.dev 1.3 30 Dec 1990 18:06:52 coleb $
  13. 12 *
  14. 13 *)
  15. 14
  16. 15 (*
  17. 16 Author: Mike Carter
  18. 17 Description:
  19. 18 Enter or edit a numeric field. Replacement for PMI
  20. 19 StrInput.ReadNumeric. Note that parameters are
  21. 20 slightly different:
  22. 21 1. PMI FloatingPoint and InDecimals parameters have
  23. 22 been removed. They simply have no meaning the way
  24. 23 real number input is now handled.
  25. 24 2. minusOK has been added - see below.
  26. 25 3. The meaning of DecimalPlaces has been changed -
  27. 26 see below.
  28. 27
  29. 28 Notes on parameters:
  30. 29 * A new field was added in
  31. 30 ScrnTypes.InputFieldRecord called "decimalPlace",
  32. 31 with corresponding type DecimalPlaceType. This
  33. 32 was designed to be passed to this routine: a -1
  34. 33 value indicates user-specified decimal points (or
  35. 34 none); a 0 means no digits after the decimal
  36. 35 point, a 1 means one digit, etc.
  37. 36 * The value of minusOK determines whether negative
  38. 37 numbers are allowed; this can be set from rMin,
  39. 38 iMin within UserOps. Must be FALSE for strings
  40. 39 that are later to be interpreted as CARDINAL.
  41. 40 *)
  42. 41
  43. 42 IMPORT KbdInput;
  44. 43 IMPORT VWindows;
  45. 44 FROM ScrnTypes IMPORT DecimalPlaceType;
  46. 45
  47. 46 PROCEDURE ReadNumericField
  48. 47 ( WindowHandle : VWindows.AWindowHandle;
  49. ***** ^ not supported yet
  50. 48 VAR TheStr : ARRAY OF CHAR; (* in/out *)
  51. ***** ^ not supported yet
  52. 49 col1 : CARDINAL; (* in *)
  53. 50 row1 : CARDINAL; (* in *)
  54. 51 FieldWidth : CARDINAL; (* in *)
  55. 52 DecimalPlaces: DecimalPlaceType; (* in *)
  56. 53 minusOK : BOOLEAN; (* in *)
  57. 54 VAR LastKey : CARDINAL; (* in/out *)
  58. 55 VAR ExitKeys : KbdInput.KeyNumSet (* in *)
  59. ***** ^ not supported yet
  60. 56 );
  61. 57 (*
  62. 58 * This is a general-purpose numeric input routine that
  63. 59 * replaces the StrInput.ReadNumeric procedure. The
  64. 60 * parameters are slightly different.
  65. 61 *)
  66. 62
  67. 63 PROCEDURE Init();
  68. 64
  69. 65 END NumInput.
  70. ***** ^ not supported yet
  71. 4 errors