Module dafmac.pkg
1//************************************************************************
2//
3// Confidential Trade Secret.
4// Copyright 1987-1995 Data Access Corporation, Miami FL, USA
5// All Rights reserved
6// DataFlex is a registered trademark of Data Access Corporation.
7//
8//************************************************************************
9// 2/26/2002 JJT - 8.2 clean up (indirect_file, local, self, etc.)
10
11//
12// ***** THIS PACKAGE IS PROVIDED SOLELY FOR COMPATIBILITY *****
13// ***** WITH DAF VERSION 1.1. *****
14//
15
16use VDFBase.pkg
17Use Func.pkg
18
19#COMMAND SUB R "TO""FROM" R
20 SUBTRACT !1 FROM !3
21#ENDCOMMAND
22
23#COMMAND ShowXY R R // ShowXY [row] [col] "text"
24 GotoXY !1 !2
25 #IF !0>2
26 Show !3 !4 !5 !6 !7 !8 !9
27 #ENDIF
28#ENDCOMMAND
29
30Function Pause GLOBAL Returns String
31 String St
32 Inkey St
33 Function_return St
34End_Function
35
36#COMMAND Pause // pause {Row Col "text"}
37 #IF !0>0
38 ShowXY !1 !2 !3 !4 !5 !6 !7 !8 !9
39 #ENDIF
40 Send Get_Pause TO DESKTOP
41#ENDCOMMAND
42
43#COMMAND Ind R // indicate command that DEMANDS indicator to be defined
44 #IFSAME !1 ~
45 #CHECK !2 _UX
46 #ELSE
47 #CHECK !1 _UX
48 #ENDIF
49 Indicate !1 !2 !3 !4 !5 !6 !7 !8 !9
50#ENDCOMMAND
51
52//define Incr for Increment
53#COMMAND INCR #ELCRUG . // general purpose increment integers, numbers dates etc
54 Increment !1
55#ENDCOMMAND
56
57//define Decr for Decrement
58
59#COMMAND DECR #ELCRUG . // general purpose decrement integers, numbers dates etc
60 Decrement !1
61#ENDCOMMAND
62
63// obsolete: Just use Set_attribute DF_FILE_STATUS
64{ Visibility=Private Obsolete=True }
65Procedure Inactivate GLOBAL Integer iFile Integer bKeepRec
66 set_attribute DF_FILE_STATUS of iFile to DF_FILE_INACTIVE // this retains recnum
67 // if keeprec is tried w/ a non recnum table, you will get an error. that's ok--- you should know about the error (and not use this)
68 If not bKeepRec ; // if not keep,
69 Set_field_value iFile 0 to 0 // set recnum to 0 // compatibility w/ recnum
70End_Procedure
71
72// obsolete: Just use Set_attribute DF_FILE_STATUS
73#COMMAND Inactivate // inactivates a record by putting 0 in the buffer
74 // Inactivate Df_File {KEEP}
75 // if {KEEP} then we put the original rec back in buffer
76 #IF !0>1
77 #CHECK !2 "KEEP"
78 Send Inactivate to DESKTOP !1.File_Number 1
79 #ELSE
80 Send Inactivate to DESKTOP !1.File_Number 0
81 #ENDIF
82#ENDCOMMAND
83
84
85
86//--------------------------------------------------------------
87// Name_Items {Item ##|NEXT} Name1 Name2 ....NameN
88//
89// Name_Items name1 name2 name3
90// Name_Items ITEM 3 Name4
91// Name_Items ITEM NEXT Name5 name6
92//---------------------------------------------------------------
93#COMMAND Name_Items
94 #IFSAME !1 ITEM // if ITEM
95 #IFSAME !2 NEXT // if ITEM NEXT then process 3rd param
96 // debug code
97 //#REM !3 named as item !e
98 #REPLACE !3 !e
99 #SET E$ !E
100 #IF (!0>3)
101 NAME_ITEMS ITEM NEXT !4 !5 !6 !7 !8 !9
102 #ENDIF
103 #ELSE
104 #SET E$ !2 // if ITEM # set to that number
105 #IF (!0>2)
106 NAME_ITEMS ITEM NEXT !3 !4 !5 !6 !7 !8 !9
107 #ENDIF
108 #ENDIF
109 #ELSE // if no ITEM as first param we are starting
110 #SET E$ 0 // with the first named item...item 0
111 NAME_ITEMS ITEM NEXT !1 !2 !3 !4 !5 !6 !7 !8 !9
112 #ENDIF
113#ENDCOMMAND
114
115