V4 - V4 Utility Module
result = V4 ( point tagarg ) |
result | The result of the module which varies according to the arguments | |
point | An option point which may be required by some of the options below. | |
tagarg | One or more tagged arguments described below |
All::pt | Returns Logical:True if pt specifies all points on a dimension, false otherwise | |
Begin::pt | Returns the starting point represented by the segment pt. | |
Binding::num | Locally sets the binding weight of the prior argument dimension to num. The prior argument must be a point on the Dim dimension. | |
Context::scope | Returns a list of points in the context. If scope is Global then only points in the global context are returned. If scope is Local then only points in the local context are returned. The global context consists of points added with the Context Add command or the Context() module. Local points are those added with the ContextL() module, the Context::xxx tag or point intersection evaluation. | |
Count::option | Returns a count based on option which may be Context for a count of the number of context insertions, Errors for the number of V4 errors, or Evaluations for a count of the number of intersection evaluations performed thus far. | |
Delete::list | Removes a list of aggregate points. | |
Epsilon::num | Sets the value of the floating point comparison epsilon-value to num. The default value is 0. See Real for more information. | |
Epsilon::list | The argument list must contain two numeric values. The first is the comparison value, the second is the update round-to-0-value. See Real for more information. | |
Error::num | Returns the error message associated with the numth nested level. If num is not within the allowed range of nested levels then an empty string is returned. | |
Logical::list | Defines a logical value for the duration of the V4 process. The list must contain two elements. The first is the name of the logical and the second element is the value. | |
Mask::format | Assigns a format mask to the point type of the first argument. This overrides any default formatting for all points of the same type. | |
Name::handle | Removes the named point-name association (described below) with the given integer handle. | |
Name::value | Assigns the string value to the value of the first argument. This option is used to relate a keyword or name to a particular point value. Note that the assignment is made not only to the dimension of the first argument but to all dimensions of the same point type. The value becomes an acceptable input value for those point types and is displayed whenever the point value of the first argument is output. The V4 call making this association returns a unique integer handle to this assignment. This handle may be used to remove the association at a later time. | |
Number::num | Associates the num with range of values to follow (see Range). The prior argument must be a dimension of type CodedRange. | |
Range::point | Used with the Number argument to set the associated range of points. | |
Segment::pt | Returns the segment type for pt as a point on Dim:UV4. The possible UV4 values are: Multiple (if point represents multiple segments), Range (point represents a single segment range), Point, All (i.e. dim..), Current (i.e. dim*), Now, Last, Undef, RHS, LHS, Sample, LT, LE, GE, GT, NE, New (i.e. dim+), PCurrent (i.e. dim**), None, and Alll (i.e. dim...) | |
Share::mode | Not yet implemented. | |
Sleep::num | Causes V4 to sleep for num seconds. | |
Sort::num | Sets the maximum number of seconds V4 will wait for a spawned sort to complete before forcing a termination. The return value is the prior setting. If num is zero then the wait will be infinite. The initial value is 300 (seconds) or 5 minutes. | |
SourceFile::hnum | Returns a list of lists describing the source files that were compiled in the building of the V4 area described by the hierarchy number hnum. Each sub-list begins with a point on Dim:UV4 which describes the entry and then follows with numeric or string points representing that value. For example, (UV4:Version major minor) denotes the version of V4 at the time of compilation. | |
SourceFile::srcref | Returns a list of values that describe source file reference srcref. The format of the list is ( hnum filenum filename linenumber ) where hnum is the hierarchy number, filenum is the file number (see the Debug command), filename is the name of the file, and linenumber is the line number within the source file. Also see the References? option within the Dim module. | |
Test::point | Sets an internal debugging point to the value of point and returns the prior value (or Logical:False if no prior value). This may be used for any type of testing/conditional execution. The use of this option can be controlled via the Secure module. See also the UserOptions tag. | |
Throw::-errmne | Disables the throwing of an exception when the V4 error occurs. | |
Throw::errmne | Enables an exception to be thrown whenever the internal V4 error corresponding to errmne occurs. Not all V4 errors can be thrown as exceptions. See the Throw? option below. | |
Type::point | Returns the V4 point type associated with the point. | |
UserOptions::string | Sets the startup user-option string to string and returns the prior value. | |
XML::case | Specifies the case of generated XML output tags. The values are AsIs (default) to keep tag case as specified, Uppercase to force all tags to upper case and LowerCase to force all tags to lower case. |
All? | Returns Logical:True if the prior point references all points of a dimension, Logical:False otherwise. | |
Begin? | Returns the starting point of the segment as given by the first argument. | |
Binding? | Returns the binding weight associated with the prior argument dimension. | |
ConnectTime? | Returns the number of seconds the V4 process has been running. | |
Context? | Returns a list of all the points in the current context. | |
CPUTime? | Returns the number of CPU seconds accumulated by the V4 process. | |
Delete? | Removes all aggregate points associated with the previously specified dimension. The number of points removed is returned as a point on Dim:Int. If the specified dimension dimension is not of point type AggRef then the module fails. | |
Description? | Returns the description associated with the dimension of the first argument. If the referenced dimension has no description then the module fails. | |
Epsilon? | Returns the current value of the floating point epsilon-value. See Real for more information. | |
Error? | Returns the last error message generated by V4. This usually corresponds to Error::0. The last error may not be the appropriate error message if multiple levels of error trapping have occurred. | |
Evaluations? | Returns the number of evaluated intersections as a point on the Dim:Int dimension. | |
Image? | Returns the full path of the current xv4.exe image. | |
Include? | Returns the file name and line number of the current 'include' file. Unlike the Source? tag, this option works at run time and is useful for displaying errors within dimension Acceptors and Displayers. | |
Name? | Returns a list of special names associated with the dimension of the first argument. If no names have been assigned then the module fails. Each name is described by a list of three points- (internalvalue externalvalue handle) where internalvalue is the internal value represented as a point on Dim:Num. | |
NoError? | If this tag is used before an Agg tagged argument then the module will not fail if the aggregate file cannot be found or read. | |
Segment? | Returns segment type of prior point (see Segment above). | |
Sort? | Returns the maximum number of seconds V4 will wait for a sort to complete. | |
SourceFile? | Returns the name of the source file from which this module is currently being executed. If the module is not being executed from within a source file then V4 fails. Note that this only succeeds at compile time. | |
Stack? | Returns the current intersection call stack as a list of Dim:Alpha points. | |
Test? | Returns the current value of the test point. An error occurs if no test value point has been defined. | |
Throw? | Returns a list of lists. Each sublist consists of an error mnemonic followed by Logical:True or Logical:False. All throw-able error mnemonics are listed. The logical value indicates whether or not each mnemonic will result in an exception. Initially all mnemnonics are set to FALSE. | |
Type? | Returns the V4 point type of the prior argument. This is usually, but not necessarily, the declared point type of the prior point's dimension. | |
Unique? | Returns a unique point on Dim:NId. All points generated within a V4 process are guaranteed to be unique from one and other. Unique points generated in one V4 process are most likely going to be different from points generated within any other process(es). | |
UserOptions? | Returns the startup user-option string. An empty string is returned if it is not set. See also the Test option. | |
Version? | Returns the current version of V4 as a list. The first element is the major version number, the second is the minor version. If a third element is given then it is the date of V4 build. It may be given as a point on Dim:UDate or as a string depending on whether or not the V4 runtime can parse the date string supplied by the compiler. |
The V4 module performs various V4 internally related functions as described by its arguments.
V4(Area?) | a list of all open areas | |
V4(Agg::olddata.v4a) | the same as Area Read olddata.v4a Aggregate command | |
V4(All::Int..) | Logical:True | |
V4(1234 Type?) | UV4:Integer | |
V4(Dim:OENum Description?) | The order number | |
Enum(V4(Stack?) @EchoT(Alpha*)) | Outputs the current intersection evaluation stack | |
V4(Remove::List(Dim:xxx)) | Removes all aggregate points on dimension xxx | |
V4(UDate:#-1 Name::TBD) | Associates "TBD" with the value "-1" for all dimensions of type UDate | |
V4(UDate:#-4 Name::"n/a" Dim:UYear,UMonth) | Associates "n/a" with all dimensions of type UDate, UYear, and UMonth | |
V4(Dim:UDate Name?) | ((Num:-1 "TBD" Int:1) (Num:-4 "n/a" Int:2)) | |
V4(Name::2) | Removes the association with the handle of 2 | |
V4(Segment::UDate:<5/1/2004) | UV4:LT | |
V4(Int:<100 Begin?) | Int:100 | |
V4(Logical::(data "c:/v4/data/")) | creates a process logical: data=c:/v4/data | |
V4(Dim:UDate Mask::"mm/dd/yy;") | sets the default formatting for all points of type universal-date |
V4ISCon - Connect to a V4IS Area
v4pt = V4ISCon ( v4dim opttag ) |
v4pt | The resulting point is a point on v4dim referencing an open connection to the area. Undefined is returned if the connect cannot be made. | |
v4dim | A dimension of type V4 | |
opttag | One or more tagged arguments described below |
Area::file | The name of the V4IS area (file) to be opened. | |
FileRef::ref | The fileref within the area to be accessed. If no fileref is given then the default fileref for the area is used. | |
Get::mode | The default get mode. The default value is Keyed. | |
Key::field | Specifies the field index for the key numbered previously specified with the KeyNum argument. If a key has multiple components then use multiple Key arguments. | |
KeyNum::num | This argument specifies which key (1 for first, 2 for second, etc.) is to be described with the Key argument below. | |
Lock::mode | Default locking mode for the area. Use 1 (or Logical:True) for record locking, 0 (Logical:False) for no locking. This effects both the locking of records accessed by this process and whether or not locks created by other processes are respected. Usually Lock:0 is used for read-only access to an area. | |
Open::mode | This argument specifies how the area is to be opened. The mode should be Read for read only access (default), Write for write-only, or Update for read/write access. | |
Put::mode | The default put mode. The default value is Keyed. | |
Share::mode | How access to records in the area are to be shared with other processes. Use 1 for shared access (default), or 0 for exclusive access. |
The V4ISCon module connects the current V4 process to a V4IS area which may reside on the host system or on another platform (which is running the V4Server process). The returned value is a point on a V4IS dimension that references the area. This point may be used in other V4ISxxx() module calls or within a List call to create a list of points referencing records or sub-records within the area.
Dim V V4IS Context Add V4ISCon(Dim:V Area::"table.dat" FileRef::9027 Open::1 KeyNum::1 Key::1) |
V4ISOp - Perform an Operation on a V4 Area
v4pt = V4ISOp ( opttag ) |
v4pt | A point previously created with the V4ISCon module. | |
opttag | One or more tagged arguments described below |
DataId::id | Access V4IS record by its unique id. | |
Get::mode | The get or read mode for this operation. Specifying this argument implies that a read operation is to be performed. | |
Key::value | Specifies the key value for this operation. If the key is composed of several parts then use multiple Key tagged arguments. | |
KeyNum::num | Specifies the key to be used for this call. Use 1 for the first (primary) key, 2 for the second, etc. The default is KeyNum::1 | |
Lock::mode | Whether or not locking is to be used for this operation. | |
Put::mode | The put or write mode for this operation. Specifying this argument implies that a write operation is to be performed. |
DataId? | Return the data-id of the record as an Int point. No data associated with the record is accessed. This option may be used to generate lists of V4IS records which may be again retrieved (at a later time) with the DataId tag. |
Key conversion is performed as follows. Integer values specifying alpha keys are converted to zero fill, right justified text fields. Alpha fields are left justified and filled with blanks.
Example 56 - Accessing a V4IS File
Dim V V4IS Context Add V4ISCon(Dim:V Area::"table.dat" FileRef::9027 Open::1 KeyNum::1 Key::1) Eval V4ISOp(V* KeyNum::1 Key::164) Eval EchoT(V4ISVal(V* Dim:Int 1) V4ISVal(V* Dim:Alpha 2) V4ISVal(V* Dim:Int 10) V4ISVal(V* Dim:Alpha 11 1) V4ISVal(V* Dim:Int 12 1) ) Eval Enum(List(V* KeyNum::0 If::GE(V4ISVal(V* Dim:Int 1) 100) Count::10 If::LT(V4ISVal(V* Dim:Int 12) 2)) @EchoT(V4ISVal(V* Dim:Int 1) V4ISVal(V* Dim:Alpha 2) V4ISVal(V* Dim:Int 10) V4ISVal(V* Dim:Alpha 11) V4ISVal(V* Dim:Int 12) ) ) |
V4ISVal - Return Value of Field in V4 Record
value = V4ISVal ( v4pt resdim index [subindex] ) |
value | The value of referenced field within the V4 area. | |
v4pt | A V4 point referencing a record within a V4 area. | |
resdim | The dimension of the resulting value. | |
index | The index number referencing the field within the record. | |
subindex | An optional argument used to reference the occurrence of a field within a substructure within the record. |
If the resulting dimension (resdim) is a dimension with the Entries option then the value is returned as a bitmap.
Eval Enum(List(V* KeyNum::0 If::GE(V4ISVal(V* Dim:Int 1) 100) Count::10 If::LT(V4ISVal(V* Dim:Int 12) 2)) |