RightClick

The right mouse button can be used to generate a RightClick event when a widget has the “RightClick” transmit property. The RightClick transmit property can be set in the Zim Screen Painter. Widgets that have the RightClick property cause FORM INPUT to terminate when they are clicked by the right mouse button. When the RightClick property causes FORM INPUT to terminate, the event structure’s EventName is set to “RightClick”, the Event.EventType is set to formfield ,and the Event.EventTag is set to the tag of the formfield that was clicked on. A right mouse click does not change the current field, and is detected only if it occurs on a widget in the current graphical window.

RightClick Event Information

The $MouseSubscript, $MouseFieldNum and $MouseFormNum variables now contains information about the field that was right clicked upon.

 

See Also

$RightClickMenu

SET EOFVALUE

Specifies an end-of-file indicator for application documents.

Syntax

SET EOFVALUE character_constant|OFF

Parameters

character_constant

Any valid character constant. If encountered during the read of an application document, the string raises an end-of-file condition.

Comments

The EOFVALUE option is set OFF by default (no character is recognized as an end-of-file).

The EOFVALUE option enables you to specify one or more characters that are to be recognized as an end-of-file indicator when the software reads an application document.

When reading input from the terminal as an application document, the software always recognizes a zero-length line as an end-of-file. The software also recognizes real end-of-file conditions, independent of the setting of EOFVALUE.

Example

set eofvalue “xyz”
add DataCollected from SerDevice
set eofvalue off
% batch complete – do something else

Assume that a device attached to your computer has been defined as an application document called SerDevice. The device is collecting data and sending it to your computer in batches that are terminated with a record containing the characters “xyz”. The above commands read the data without waiting between batches.

INTERSECT

INTERSECT

Isolates the common members of two or more result sets.

Syntax

set1 INTERSECT set2

Parameters

set1A result set produced from the execution of a set-producing command. All sets in the command must have the same component structure.
set2A result set produced from the execution of a set-producing command. All sets in the command must have the same component structure.

Comments

When used within a FIND command, the result set contains the members that are common to each of the specified result sets, with duplicates eliminated.

See Also

FIND

MINUS

UNION

SET TRACE

Controls command tracing.

Syntax

SET [LOCAL] TRACE ON|OFF

Parameters

LOCAL

Indicates that command tracing is to be switched ON or OFF at the “local” level only.

Comments

The SET TRACE command controls command tracing. When TRACE is switched ON, each line of a procedure is displayed as it is executed. Each line is preceded by the procedure name and document line number as shown in the following example:

pCustReport[19] report from Customers

SET TRACE has no effect on compiled application programs.
SET TRACE is not affected by the SET RESET and SET RESTORE commands.

Example

To display the instructions in the procedure MyProg as they are executed, use

set trace on
MyProg

 

See Also

SET COMMANDTIMING

SET LEXTRACE

SET TRACEOUTPUT

DDEDisconnect

DDEDisconnect

Terminate access to the remote application.

Syntax

procedure DDEDisconnect (out tErrCode, inout tServ)

Parameters

tErrCode

longint, an error code

tServ

longint, connection handle

Comments

DDEDisconnect terminates the access to the remote application.

The filename is ddedisc.pgm.

Example

For example, given that DDE_Err and hServ are of type longint and that hServ has been set by a previous call to DDEConnect, enter the following to terminate a DDE conversation:

DDEDisconnect (DDE_Err, hServ)

This example ends a conversation previously established using the CONNECT service.

$filepath

$filepath

Returns the path of the disk file associated with a specified object.

Syntax

$filepath(objname)

Parameters

objnameThe name of an EntitySet, relationship, application directory, or application document.

Return Value

The $filepath function returns a character string containing the path to the disk file that contains the specified object. AREAS.ZIM or DIRS.ZIM entries that apply to the file are expanded, as are the special path indicator characters. The value of $filepath is dynamically set, unless the program is compiled. Once a program is compiled, this value cannot be changed.

See Also

$ClipPath

$DBPath

$filenum

$ImagePath

$WorkPath

$ZimPath

SET SINGLESTEP

Steps through a procedure one command at a time, halting after each command.

Syntax

SET SINGLESTEP ON|OFF

Comments

When SINGLESTEP is switched ON, execution is halted (by the HALT utility) after each command executed. To resume execution after the HALT, press Enter at the HALT prompt (>>).

Compiled application programs are not affected by SET SINGLESTEP.

The SET SINGLESTEP command is not affected by the SET RESET and SET RESTORE commands.

Example

To switch to singlestep, use

> set trace on
> set singlestep on

Now, if you execute an application program, it looks like this:

> DoCusts (“edit”)
procedure DoCusts (in ExMode)
>>output $setcount
35
>>(carriage return)
let dp = $true
>>.
.
.

See Also

SET STOP ERRORS

$truncate

Truncates a decimal number, making it an integer.

Syntax

$truncate(number)

Parameters

numbera number, or an expression that evaluates to a number

Return Value

Number, with no decimal places.

Example

$truncate(2.49)

Evaluates to 2.

$truncate(2.99)

Evaluates to 2.

int1 - $truncate(int1/int2) * int2

Performs int1 modulo int2. Can also be expressed as $modulus(int1,int2).

See Also

$modulus

$round

$tonumber

$ttrim

Trims trailing blanks from a character string.

Syntax

$ttrim(string)

Parameters

stringa character string, or any expression that evaluates to a character string

Return Value

Character string.

Comments

Use $ttrim to remove trailing spaces from a character string.

For output purposes, the implicit length of the result returned by $ttrim is the same as the length of string.

Example

$ttrim (LastName)

Evaluates to “Smith” if LastName is stored as “Smith “.

detail line $concat($ttrim(LastName),", ",FirstName)

Displays a last name first in a report.

See Also

$ltrim

pt_BRPortuguese