$sin

Calculates the sine of a number.

Syntax

$sin(number)

Parameters

numbera number, or an expression that evaluates to a number

Return Value

Number, with the same number of decimal places as number.

Comments

The value returned by this function has the same number of decimal places as number. Ensure that you specify enough decimal places in your equation to ensure a sufficiently granular result. Unusual results such as
-0 are an indication that the number of decimal places needs to be increased. For example, if you enter

$sin(4)

without any decimal points, you receive the result

-1

However, if you enter

$sin(4.0000)

you receive the result

-0.7568

Example

let var1 = $sin(0)

Evaluates to 0.

See Also

$asin

$cos

$sinh

$tan

About Functional Expressions

$rightjustify

Right-justifies a character string.

Syntax

$rightjustify(string)

Parameters

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

Return Value

Character string, consisting of string right-justified in a space $length(string) characters long. Trailing blanks in string are ignored.

Example

$rightjustify("abcde ")

Evaluates to ” abcde”.

$rightjustify(var1)

Evaluates to ” 3″ if var1 is a LONGINT variable whose value is 3 (occupies 12 character spaces).

See Also

$center

$leftjustify

About Character Literals

About Functional Expressions

Conversion Between Data Types

$total

Sums a set of values, excluding those in which the expression is $Null.

Syntax

$total(expression)

Parameters

expressionany expression

Return Value

Number.

Comments

Expression is often a WHERE expression that includes only selected values in the totalling operation. If the WHERE expression (expr1 WHERE expr2) is true, the expr1 value is included in the operation; otherwise, expression is considered $Null and is not included.

Example

compute Employees where DeptName="Sales"
evaluate(let TotSal = $total(Salary))
(let TotSalF = $total(Salary where Sex = "F"))

Finds the total of all employees’ salaries, and the total of the salaries of all female employees, in the Sales department.

See Also

$average

$count

$max

$min

About Functional Expressions

Number Literals

$cosh

Calculates the hyperbolic cosine of a number.

Syntax

$cosh(number)

Parameters

numbera number, or an expression that evaluates to a number, representing an angle (in radians)

Return Value

Number, with the same number of decimal places as number. Ensure that you specify enough decimal places in your equation to ensure a sufficiently granular result. Unusual results such as -0 are an indication that the number of decimal places needs to be increased. For example, if you enter

$cosh(5)

without any decimal points, you receive the result

74

However, if you enter

$cosh(5.0000)

you receive the result

74.2099

Comments

This function calculates the hyperbolic cosine of a number.

Example

let vAngle = $cosh(3.000)

Variable vAngle is set to 10.068.

See Also

$acos

$cos

$sinh

$tanh

SET INFORMATION

Enables or suppresses the display of information messages.

Syntax

SET INFORMATION ON|OFF

Comments

The INFORMATION option is set ON by default.

When INFORMATION is ON, information messages are displayed. Setting INFORMATION to OFF suppresses the display of such messages. Information messages are of the form:

nnn selectedafter a FIND command
nnn addedafter an ADD command
nnn changedafter a CHANGE command
nnn deletedafter a DELETE command

All types of messages can be simultaneously turned on or off with a SET MESSAGES command.

The SET INFORMATION command has no effect on the logging of messages in the “error trace” file. Message logging is governed by the configuration option error trace.

Example

set messages on
set information off

The preceding commands set error and warning messages on, but information messages off.

See Also

SET ERRORS

SET WARNINGS

SET TRACE OUTPUT

Records tracing information.

Syntax

SET TRACE OUTPUT docname [APPEND]

Parameters

docnameThe name of an application document.
All subsequent trace output is sent to the specified document.
APPENDIndicates that subsequent trace output is to be appended to the existing contents of docname.

Comments

Normally, information generated by the commands SET COMMANDTIMING, SET FLOW, SET LEXTRACE, SET STRATEGY, SET TRACE, and SET TRANSACTION FLOW is displayed on the screen. The SET TRACE OUTPUT command enables you to redirect the output to docname.

Example

set trace output RecordTrace

Redirects tracing information to an application document called RecordTrace.

set trace output terminal

Tracing information is displayed on the terminal screen.

See Also

SET FLOW

SET LEXTRACE

SET STRATEGY

SET TRACE

SET TRANSACTION FLOW

$tan

Calculates the tangent of a number.

Syntax

$tan(number)

Parameters

numbera number or an expression that evaluates to a number

Return Value

Number, with the same number of decimal places as number. Ensure that you specify enough decimal places in your equation to ensure a sufficiently granular result. Unusual results such as -0 are an indication that the number of decimal places needs to be increased. For example, if you enter

$tan(3)

without any decimal points, you receive the result

-0

However, if you enter

$tan(3.0000)

you receive the result

-0.1425

Comments

The value returned by this function has the same number of decimal places as number.

Example

let var1 = $tan(0)
let var1 = 3.14
let var2 = $tan(0.50*var1)

See Also

$atan

$cos

$sin

$tanh

About Functional Expressions

UP

Moves the current member pointer one or more records “up” in a result set.

Syntax

UP [num] [setname]

Parameters

numCan be:
an integer constant (15, 200);
a variable, form field, or parameter that evaluates to an integer;
the word ALL.
The default value of num is 1.
If num is negative, the command effectively becomes a DOWN or NEXT command.
setnameThe name of a result set. If setname is omitted, the current set is used.

Comments

PREVIOUS is a synonym for UP.

Example

up 10

Moves the current member pointer 10 members “up” towards the start of the set.

up 5 MySet

list 5 MySet

Moves the current member pointer five members “up”, then lists five members (starting with the new current member).

See Also

$currentmember

BOTTOM

DOWN

LOCATE

NEXT

PREVIOUS

TOP

DDEExecute

DDEExecute

Send commands and macros to the target application.

Syntax

procedure DDEExecute (out tErrCode, inout tServ,
 in app_cmd)

Parameters

tErrCode

longint, an error code

tServ

longint, connection handle

app_cmd

char, command or macro to be executed

Comments

DDEExecute sends target application specific commands and macros to be executed by the remote application. Consult the documentation of the remote application for information on these commands.

The filename is ddeexec.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, to send the ‘[NEW(1)]” command to EXCEL

DDEExecute(DDE_Err, hServ, ‘[NEW(1)]’)

instructs EXCEL to open a new spreadsheet.

SET NULLVALUE

Specifies the characters to be displayed for $Null values.

Syntax

SET NULLVALUE constant

Parameters

constant

A character string, or an expression that evaluates to a character string.

Comments

The NULLVALUE option is set to a space character by default.

When a value to be output is $Null, the specified constant is displayed.

Example

To specify that the character constant NA is to be displayed for $Null expressions, use

> set nullvalue “NA”

As a result, a LIST command looks like this:

> list 3 Employees
 
LastName    FirstName    Salary
Smith      John        25000
Jones      NA         35000
Johnson     Janet        NA

 

See Also

$Null

Expressions and the $Null Property

en_CAEnglish