Macro - Obtain Information on V4 Macros
respnt = Macro ( tag ... ) |
respnt | The result depends on the arguments. | |
tag | One or more of the tagged options below |
Dim::dim | Normally the ListOf? option returns a list on Dim:List. This may be overridden with this option. | |
Macro::name | Specifies a macro name name. |
Count? | Returns a count, on Dim:Int, of the number of times the macro (as specified by the Macro argument) has been referenced. | |
ListOf? | If the first argument is a macro name then this option returns the lines of text within the macro. | |
ListOf? | Returns a list of all defined macros. |
This module returns information about the macros currently defined.
Macro(ListOf?) | returns a list of all defined macros | |
Macro("MAC1" ListOf?) | returns a list of all the lines within macro MAC1 | |
Macro(Macro::foo Count?) | returns the number of times macro 'foo' has been referenced |
MakeI - Construct a V4 Intersection
isct = MakeI ( point point ... ) | |
isct = MakeI ( tag point point ... ) | |
isct = MakeQI ( same as MakeI ) |
isct | The intersection made up of the argument points. | |
tag | Optional tag | |
point | One or more points. |
Fail::point | Use the point as the value to evaluate/return if the intersection fails. |
Dot? | Used to indicate that all following points are to be joined in a dot notation as opposed to a standard intersection. See the example below. | |
Force? | Adds the forceEval quality to the intersection. | |
Quote? | Adds the quoted quality to the intersection. This tag makes the MakeI module identical to the MakeQI module. | |
Remove? | Set the auto-remove tag ('~') on the next point. | |
Trace? | If given then flag this intersection for tracing. |
MakeI returns an intersection consisting of its arguments. If the first argument is a point on the IntMod dimension then MakeI returns an internal module call.
The argument UV4:none is ignored by this module (i.e. UV4:none points are not included in the intersection). To include this point, quote it.
The MakeQI module is identical to the MakeI module except that it returns a quoted intersection.
MakeI(IntMod:Plus 100 23 ) | Plus( Int:100 Int:23 ) | |
MakeI(LastOfMonth UMonth:9601) | [LastOfMonth UMonth:9601] | |
MakeI(Dim:Cus Name) | [Dim:Cus Name] | |
MakeQI(Dim:Cus Name) | @[Dim:Cus Name] | |
MakeI(Dim:Cus Name Quote?) | same as above | |
MakeI(Dim:Cus Name Trace?) | [? Dim:Cus Name] | |
MakeI(Dot? Dim:Cus Name) | Cus.Name ([Cus* Name]) | |
MakeI(Dot? Dim:Cus Sales Fail::0) | Cus.Sales,0 | |
MakeI(IntMod:List Bits::10 Force?) | `List(Bits::10) |
MakeIn - Construct a V4 In() Module
inmod = MakeIn ( dim point ) | |
inmod = MakeIn ( dim (name rel value) ) |
inmod | The resulting In() module call. | |
dim | A dimension name or dimension point. | |
point | A V4 point | |
name | A (database) element name | |
rel | A relation, one of: LT, LE, EQ, GE, GT, NE | |
value | A V4 point value |
This module constructs an In() module from its arguments.
MakeIn(emp salary:40000..50000) | In(emp.salary salary:40000..50000) | |
MakeIn(emp (salary LT 100000) | In(emp.salary Int:<100000) |
MakeL - Construct a V4 List
list = MakeL ( point point ... ) | |
value = MakeQL ( arguments same as MakeL ) |
point | One or more points. | |
list | The list made up of the argument points. |
MakeL constructs a list of its arguments and returns it as its value. Note that lists of lists can be constructed through the nested use of this module.
The argument UV4:none is ignored by this module (i.e. UV4:none points are not included in the list). To include this point, quote it.
MakeQL is identical to MakeL except that a quoted list is returned.
MakeL( now is the time ) | (now is the time) |
MakeLC - Construct a V4 List (Conditionally)
list = MakeLC ( logical point ... ) |
list | The list made up of the argument points. | |
logical | Any point which results in a logical value. | |
point | Any V4 point. |
MakeCL constructs a list based on pairs of arguments. If the first point of a pair is true then the second point in the pair is included in the list. If it is not true then the second point in the pair is skipped.
This module evaluates each of its arguments on an as-needed basis (i.e. if the first argument of a pair is FALSE then the second argument of the pair is NOT evaluated).
MakeLC(1 now 1 is 0 the 1 time) | (now is time) | |
MakeI(APoint `MakeLC(DefQ(Dim1*) Dim1* DefQ(Dim2*) Dim2*)) | constructs intersection of form [APoint ...] where "..." includes the values of Dim1* and/or Dim2* iff they are defined in the current context |
MakeP - Construct a V4 Point
newdim = MakeP ( dimdim dimpoint ) | |
dimpoint = MakeP ( dimdim point ) | |
newpoint = MakeP ( dimpoint ) | |
point = MakeP ( tagpoint ) | |
point = MakeP ( tagpoint tagval ) | |
point = MakeP ( dimpoint StdIn? ) | |
point = MakeP ( dimpoint StdIn::promptpoint ) | |
point = MakeP ( dimpoint Special::specpoint [specval] ) | |
point = MakeP ( dimpoint pointval1 pointval2... ) | |
point = MakeP ( int2dim intval intval ) | |
point = MakeP ( teledim [country] areacity number [extension [type]] ) | |
point = MakeP ( teledim [type] alternate ) | |
point = MakeP ( xdbdim xdbId recId ) | |
point = MakeP ( uomdim num id index [casecount] ) | |
point = MakeP ( uomperdim num uom ) | |
point = MakeP ( uomperuomdim uom1 uom2 ) | |
point = MakeP ( complexdim real imaginary ) | |
point = MakeP ( geodim latitude longitude [altitude [timezone]] ) | |
point = MakeP ( geodim latitude longitude altitude timezone distspd distuom speeduom altuom azimuth elevation datetime ) | |
point = MakeP ( caldim udate utime timezone daylightsavings ) | |
point = MakeP ( caldim udt timezone [daylightsavings] ) | |
point = MakeP ( udtdim cal timezone [daylightsavings] ) | |
point = MakeP ( udtdim cal geo [daylightsavings] ) | |
point = MakeP ( uddim year month day ) | |
point = MakeP ( umondim year month ) | |
point = MakeP ( uqtrdim year quarter ) | |
point = MakeP ( udtdim year month day [hour [minute [second]]] ) | |
point = MakeP ( utimedim hour minute [second] ) | |
point = MakeP ( utimedim second ) | |
point = MakeP ( uwkdim year week ) |
newdim | A newly created dimension with a name of MakePnum where num is a unique number. | |
dimdim | The Dimension dimension, i.e. Dim:Dim. | |
dimpoint | A dimension point, i.e. Dim: dimension. | |
newpoint | A new point on the argument dimension. | |
tagpoint | A point on the Dim:Tag dimension such as Tag:If or Tag:While. If no tagval is given then a tagged result point (tag?) is created. | |
tagval | The value to be linked to the tag point. | |
StdIn? | V4 prompts the connected user for the point value. | |
promptpoint | A point (usually a character string) to be used as a prompt for connected user input. | |
specpoint | One of: Current, PCurrent, Undefined, Now, Sample; or one of All, LE, GE, GT, or NE which must be followed by a third value (see discussion below). | |
specval | A value that is required if specpoint is one of LE, GE, GT, or NE. | |
pointval | A value for the point. Multiple value may usually be given. | |
int2dim | A dimension of point type Int2. | |
intval | A integer value. | |
teledim | A dimension of point type TelephoneNumber. | |
country | A telephone country code (e.g. 1 for the USA). | |
areacity | A area or city code. | |
number | A telephone number. | |
ext | An extension. A zero indicates no extension. | |
type | Type type of phone, one of: HOME, WORK, CELL or FAX. | |
type | If the arguments for a telephone point are not numeric then [UV4:AcceptorTele] is evaluated with the points. The result must be a list, an integer or an integer2 point. | |
alternate | An alternate (e.g. email address) electronic address. See TelephoneNumber for more details and examples. | |
xdbdim | A dimension of point type XDB. | |
xdbId | An external database Id. | |
recId | A record Id. | |
uomdim | A dimension of point type UOM. | |
num | An integer or real number. | |
id | An integer UOM id number. | |
index | An integer index into a UOM entry. | |
casecount | An integer case count. | |
uomperdim | A dimension of point type UOMPer. | |
uom | A unit-of-measure point. | |
uomperuomdim | A dimension of point type UOMperUOM. | |
uom1 | The top (or numerator) unit-of-measure. | |
uom2 | The bottom (or denominator) unit-of-measure. | |
complexdim | A dimension of point type Complex. | |
real | A real number. | |
complex | A real number representing the imaginary component of a complex number. | |
geodim | A dimension of point type GeoCoordinate. | |
latitude | A real number representing decimal latitude. | |
longitude | A real number representing decimal longitude. | |
altitude | A integer number representing elevation in meters. | |
timezone | An integer timezone. | |
distspd | The distance or speed. | |
distuom | If non-zero then unit-of-measure of distance. | |
speeduom | If non-zero then the unit-of-measure of the speed. | |
altuom | The unit-of-measure of the altitude. | |
azimuth | The azimuth in degrees. | |
elevation | The elevation in degrees. | |
datetime | The date-time as a Calendar point. | |
caldim | A dimension of point type Calendar. | |
udate | A universal date point. | |
utime | A universal time point. | |
daylightsavings | A point equal to Logical:True if daylight savings is in effect, False if not. | |
udt | A universal date-time point. | |
udtdim | A dimension of point type DateTime. | |
utimedim | A dimension of point type UTime. | |
cal | A calendar point. | |
geo | A geocoordinate point. |
Special::specval | Create a special point on the dimension. Allowed values for specval are: Current (for current value- dim*), PCurrent (for prior current- dim**), Undefined (for undefined value- dim:{undefined}), Now (for current date-time- dim:{now}), Sample (for a sample point- dim:{sample}), All (for all points- dim..), AllCnf (for all points/confirmed- dim...), LT/LE/GE/GT/NE (for the relational points) note these forms take an additional third argument. |
The MakeP module makes V4 points. It has several forms depending on the type of point to be made. This module shares some functionality with the Project module.
Note that this module never invokes the Acceptor that may be associated with a dimension. Use the Project module to coerce or project an alpha point value to another dimension through its acceptor function.
The StdIn tag may be used to input a point value from the connected user's console. The user is prompted with the given promptpoint or '? ' if no prompt is specified. The user's input is then converted to the appropriate internal value as determined by the first argument dimension point. The module fails if the input is not a valid point or a blank line is entered.
There are two ways to create dimension points. The first is with projection which converts a point's dimension to a dimension point. The second is with this module which attempts to create a dimension point from another point's value. See examples below.
MakeP(Dim:Dim Dim:xxx) | makes a new dimension with the same type and characteristics of xxx | |
MakeP(Dim:Dim xyz:abc) | attempts to return the dimension point Dim:abc (if it exists) | |
Dim:=xyz:abc | returns the point Dim:xyz | |
MakeP(Dim:xxx) | returns a new point on dimension xxx. This dimension must have the PointCreate New option. | |
MakeP(pt Special::type) | creates a special point on the dimension associated with pt. The valid types are those supported by the {xxx} special types (e.g. Current, Undefined, Sample, All ...) | |
MakeP(pt Special::rel value) | creates a relational point based on the dimension of pt and the value. The allowed rel values are LT, LE, EQ, GE, GT, and NE. | |
MakeP(dim value ...) | creates a point reference on dim spanning all values. | |
MakeP(Dim:dict string) | Converts an alpha string point to a dictionary point on dimension dict | |
MakeP(Dim:aggval pt pt ...) | Creates an aggregate point on dimension aggval consisting of all specified points pt. | |
MakeP(Dim:xxx string) | Converts the alpha string to a valid point on dimension xxx. If the conversion cannot be made then an error is generated. | |
MakeP(Dim:xxx,yyy string) | Attempts to convert string to a point on dimension xxx. If successful then the point is returned. Otherwise an attempt is made to convert to a point on dimension yyy. | |
MakeP(Dim:alpha pt) | Converts the point pt to an alpha (readable) format. | |
MakeP(Dim:xxx StdIn?) | Prompts the user for a point on dimension xxx and returns it as the value | |
MakeP(Dim:xxx StdIn::prompt) | Prompts the user with prompt for a point on dimension xxx. | |
MakeP(Dim:Int now ) | Int:5432902993 | |
MakeP(Dim:InvItem ) | InvItem:32234 (creates a new point) | |
MakeP(Int:123 Special::All) | Int.. | |
MakeP(Int:123 Special::LT 400) | Int:<400 | |
MakeP(Dim:UDate,Alpha 12/31/99) | UDate:991231 | |
MakeP(Dim:UDate,Alpha tomorrow) | Alpha:Tomorrow | |
MakeP(Dim:UTime 3600) | UTime:01:00:00 (3600 seconds = 1 hour) | |
MakeP(Dim:UTime 3 8 29) | UTime:03:08:29 | |
MakeP(Cus:123 Special::Current) | Cus* | |
MakeP(Tag:UC) | UC? | |
MakeP(Tag:Head "HoHoHo") | Head::"HoHoHo" |
The next example shows how a PointReference point can be used to create a list on a point-by-point basis-
Dim PR PointRef |
= MakeP(Dim:PR ()) | makes a new point on the PR dimension with an empty list as the base |
PR:0 =List(PR:0 Append::foo) =PR:0 (FOO) |
MakePm - Make a Point Referencing Multiple Values
result = MakePm ( dim point point tag... ) | |
result = MakePm ( point point tag... ) |
result | The resulting point is based on the arguments. | |
dim | The dimension of the resulting point. | |
point | A value point to be included in the result point. |
This module is similar to the MakeP routine but is used to create point references with multiple values. The first argument may be either a dimension or a point on a dimension. Each additional argument must be of the identical point-type of the first argument (or point type of the dimension if it is the first argument).
This module shares some functionality with the Num module.
Many dimensions allow multiple values to be referenced as a single point. Such points can be constructed with this module by listings the values as arguments 2 through n where n-1 is the number of points (ex: MakePm(Dim:Int 2 4 6 8) results in Int:2,4,6,8. It is sometimes useful to have a point reference hundreds or thousands of values. This cannot be done by enumerating the values as arguments to MakePm as there is a limit to the number of arguments within a V4 module. It is possible by specifying a list of points as the second argument. For example, MakePm(Dim:Int Num(1 To::2000)), creates the point Int:(1 2 ... 2000) which is actually a list value on the Int dimension. Caution must be exercised with this option. For example MakePm(Dim:Int (now is the time)) is valid, but if the results are inserted into the context and Enum(Int*...) is evaluated, the subsequent Dim:Int points would actually be Dim:NId points!
The value point UV4:none is ignored. If this point is required as a valid argument then use @UV4:none.
MakePm(Dim:Int 1 4 Int:10..14 MakeP(Dim:Int 100 To::125)) | Int:1,4,10..14,100..125 | |
MakeP(mDim:Int `Num(1 To::1000)) | results in an error because module has too many arguments | |
MakePm(Dim:Int Num(1 To::1000)) | results in Int:(1..1000) |
MakeT - Make a Test Intersection
isct = MakeT ( point point tag... ) |
isct | The intersection made up of the argument points. | |
point | One or more points. |
Fail::point | The point is appended as the failure point for the intersection. |
The MakeT module is similar to the MakeI module in that it constructs an intersection from its arguments. It is intended to create And/Or tests and has the following characteristics. If there are only two arguments then the second argument is returned as the value. If it has three or more arguments then the third through the last are quoted.
The argument UV4:none is ignored by this module (i.e. UV4:none points are not included in the intersection). To include this point, quote it.
MakeI(IntMod:And @GE(A* 100)) | And(GE(A* 100)) | |
MakeT(IntMod:And @GE(A* 100)) | GE(A* 100) | |
MakeI(IntMod:And @GE(A* 100) @LE(B* 0)) | And(GE(A* 100) LE(B* 0)) | |
MakeI(IntMod:And @GE(A* 100) @LE(B* 0)) | And(GE(A* 100) @LE(B* 0)) | |
MakeI(IntMod:And @GE(A* 100) @LE(B* 0) Fail::Logical:True) | And(GE(A* 100) @LE(B* 0)),Logical:True | |
MakeI(IntMod:And) | results in Logical:True |
Maximum - Return Largest Point
largept = Maximum ( num num num ... dim ) | |
largept = Maximum ( list dim ) |
largept | The largest number in the argument list. | |
num | A numeric argument. | |
list | A list of numbers. | |
dim | If specified, the result is returned on that dimension. |
The Max module iterates through all arguments and returns the largest point. If the single argument is a list then the module returns the largest number in the list. See also StatMax and Optimize.
Maximum( 1 2 3 4 5) | Returns 5 |
Message - Send/Receive Message to/from Other V4 Processes
result = Message ( tagarg ... ) |
result | Depends on the arguments. | |
tagarg | One or more of the tagged arguments below. |
Close::lstnid | Shut down the listener process with identifier lstnid and free all resources associated with it. Any messages remaining in the message queue from the listener will remain until removed with the Delete option. | |
Delete::msgid | Delete the message with identifier msgid from the listener message queue. | |
Dim::dimension | If this argument is specified when defining a listener then dimension will be updated with number of messages in the queue and inserted into the context whenever a message is received or removed. | |
Group::ipaddress | Specifies the IP address to be used with multi-cast messages (sending and receiving). | |
Host::ipaddress | Specifies the IP address to be used with normal messages (sending and receiving). The format can be any valid IP address specification. A port may be optionally given with the standard ':portnumber syntax. | |
Id::id | Defines a text identifier for the current message being sent. | |
Listen::how | Starts up a new listener process. If how is Queue (default) then received messages are queued and available for processing in FIFO order. If how is Context then all messages are considered as V4 points and inserted into the context upon receipt. The value returned is the listener id associated with this message handler. This lstnid may be used as the argument to the Close option to shut down a message listener. | |
ListOf::lstnid | Returns a list of all messages in the queue for the defined listener. The module fails if there are currently no messages for that listener. | |
Reply::logical | Used by a message sender to notify listening process that it is (not) expecting a reply. If logical is TRUE then a reply is expected and the listening process must send a reply. | |
Reply::msgtext | The listening process is sending msgtext back to the client process as the reply to its request. | |
Send::list | Sends a list of points. This is primarily for receivers with the Listen:Context option. The list is entered into the receiver's context as a single point. | |
Send::`list | Identical to the above except that all points in the list are evaluated before being sent. Upon receipt, each point in the list is entered as a separate point into the receiver's context. | |
Send::msgtext | Sends msgtext to the listener defined through the Host parameter. | |
Sequence::msgid | Specifies the message id when used with the Message?, Id?, etc. options. | |
Spawn::cmdline | This argument may be used when sending a message. If the Host IP address/port is not currently listening for a message, V4 will spawn a subprocess and execute cmdline within that process. This subprocess should be a V4 process defining a listener so that the message may be sent. | |
TTL::value | Defines the time-to-live parameter for multi-cast messages sent over the network. The default is a value of 1 (Subnet). The allowed values are: a number from 0 to 255 or one of the following- Continent, Host, Region, Site, Site, Unrestricted. See IP multicast for more information on this option. | |
Wait::timelim | Wait a maximum timelim seconds for a message. If no message is received within this time limit, the module fails. This option may also be used when sending messages. In this case the parameter represents the number of seconds to wait before the receiver is allowed to see the message. That is the message is sent immediately and enters the receiver's queue but will not be accessable until the specified time limit is up. |
Calendar? | Returns the calendar date-time that the message was sent. Note: Calendar points are date-times relative to GMT. | |
Id? | Returns a list with two elements that identify the sender and listener(receiver) of the current message. If the message is associated with an error then an empty list is returned. | |
Listen? | Starts up a new listener process (Listen:Queue) as defined by the prior arguments to the module. | |
ListOf? | Returns a list of all messages in the queue for all listeners. The module fails if there are currently no messages in the queue. | |
Message? | Returns the message as defined by the current message identifier. | |
Next? | Returns the unique identifier of the next message in the queue. | |
Peer? | Returns the IP address associated with the sender of the current message. |
This module is used to send and receive messages among cooperating V4 processes. Messages can be sent directly from one process to another or a message can be broadcast to an undetermined number of listeners. This module currently uses TCP/IP for direct process-to-process messages and IP multicasting for broadcasting. However this is subject to change and applications using this feature should not assume or depend on any IP specific features.
If errors occur during the receipt of a message then a message is created with the text being a description of the error. Errors can be differentiated from normal messages with the Id? argument.
Example 32 - Sending an XML message
[ExampleMsg] " Eval Message(Host::"www.anothersystem.com:4567" Id::"Test" Send::[ExampleMsg]) |
Example 33 - Receiving and Parsing an XML Message
[ListenerRoutine] Do(Message(Ack::@Str("Ack # " Counter(Next::Ack)) Id::"Listener1" Host::"www.anothersystem.com:4567" Listen?) Enum(While::TRUE @Do(Context::MsgId:=Message(Wait::99999 Next?) MsgId.LogMsgReceipt Context::Parse(Message(Sequence::MsgId* Message?) Tree::Dim:HTree XML?) [HandleMessageRoutine] Message(Delete::MsgId*) Tree(HTree* Remove?) )) ) |
Example 34 - A Customer Lookup Example
Dim msgId Int /* This example sets up listener (server) waiting for customer lookup pattern string It first spins through the customers and creates a temp file with name and address information It then waits for a request on port 6000 to come in and compares the request against the customers in the temp file All matches are returned as a JSON array cusLookup:[[ref,name,city,state,zip],[...]...] A sample request would be sent with: Message(Host::Str(OSInfo(IPAddress?) ":" 6000) Reply::TRUE Send::"WASH PA") */ Set Trace +TimeStamp [messageTest] Do( /* Make a temp file of customer attributes for searching */ Context(fileName:=[xlb:fileName fileType:temp]) Output(Create::fileName* Id::cus) Enum(cus.. @EchoT(Out::cus cus* Str(cus.name ' ' cus.city UC?) cus.state cus.zip)) Output(Id::cus Close?) Message(Host::Str(OSInfo(IPAddress?) ":" 6000) Listen?) Enum(Num::99999 @Do(Context::msgId:=Message(Wait::999999 Next?) Context::Str(Message(Sequence::msgId* Message?) UC? Split::" ") Context::EnumCL(OSFile(fileName* ListOf?) If::Str(Alpha* All::List*) @Str(Alpha* Split::" ")) EchoD(Str(msgId* " Lookup(" Message(Sequence::msgId* Message?) ") returns " ListSize(List*) " results")) Message(Sequence::msgId* Reply::JSON(Name::"cusLookup" List*)) Message(Delete::msgId*) )) ) Eval [messageTest] |
Minimum - Return Smallest Point
smallpt = Minimum ( num num num ... dim ) |
smallpt | The smallest number in the argument list. | |
num | A numeric argument. | |
dim | If specified, the result is returned on that dimension. |
The Min module iterates through all arguments and returns the smallest point. If the single argument is a list then the module returns the smallest number in the list. See also StatMin and Optimize.
Minimum( 1 2 3 4 5) | Returns 1 |
Minus - Negation or Difference of Two Numbers
negation = Minus ( npt1 ) | |
resnum = Minus ( npt1 npt2... ) |
negation | The negation of the argument. If the argument is a number then 0-number is returned. If the argument is a logical, then the negation of the argument is returned. | |
resnum | The resulting numerical point. Note that the dimension of the result is always the dimension of the second argument to the module unless it is of dimension Int. In this case the dimension of the first point is used. | |
npt1 | A numerical point. | |
npt2 | A numerical point. |
In its unary form, Minus negates its argument. With more that one argument, Minus simply subtracts the second through last argument from the first, returning the result in the dimension of the first argument from the right that is not of the Int dimension. Use dimension projection to force points back to wanted dimensions.
Minus(UDate:961231 UDate:961101) | UDATE:18590116 | |
Int:=Minus(UDate:961231 UDate:961101) | INT:60 | |
Minus(UMonth:9612 10) | UMonth:9602 | |
Minus(Logical:True) | Logical:False |
MT - Determines if a point is Empty
logical = MT ( point tag tag.. ) | |
point = nMt ( point ) |
point | The point to be tested for emptiness. | |
tag | One or more of the tagged arguments below. |
Else::point | Evaluate and return point if the first argument is (not) empty. | |
Then::point | Evaluate and return point if the first argument is (not) empty. |
This module tests its argument and returns Logical:True if it is empty, Logical:False otherwise. The nMT returns the logical compliment (i.e. not empty).
Any point with a value of 'none' is considered empty.
A string is considered empty if it is has no length or consists solely of whitespace. A list is empty if it contains no points. A drawer is empty if it contains no points. A number is empty if it is equal to zero.
MT(" ") | returns TRUE | |
nMT(" xxx") | returns TRUE | |
MT(Alpha* Then::empty Else::full) | returns NId:empty if Alpha* is empty, NId:full otherwise | |
MT(@[]) | returns TRUE |
MthMod - Calculates Number Modulo n
resnum = MthMod ( npt1 npt2 ) |
resnum | The resulting numerical point. | |
npt1 | A numerical point. | |
npt2 | A numerical point. |
This module divides the first argument by the second and returns the remainder as the result. If npt2 is negative then it is converted to a positive. If npt1 is positive then the result is always between 0 and npt2-1. If npt1 is negative then the result is always between -(npt2-1) and 0.
MthMod(11 10) | Int:1 |
Mult - Multiplication of Two Numbers
resnum = Mult ( npt1 npt2 tagarg ) |
resnum | The resulting numerical point. Note that the dimension of the result is always the dimension of the second argument to the module. | |
npt1 | A numerical point. | |
npt2 | A numerical point. |
Round::n | Round the results to n decimal places if n is positive, or to the nearest power of 10 if n is negative. |
This module multiplies its two arguments.
Mult(Real:5 15) | Int:75 | |
Mult(344.44 21.33) | Num:7346.9052 | |
Mult(344.44 21.33 Round::3) | Num:7346.905 | |
Mult(344.44 21.33 Round::-3) | Num:7000 |