Home Search

DriveWorks Solo 22
Functions

Send Feedback

Introduction

The following list all functions that have been included as new features and those that have been enhanced.

Newline

The NewLine function accepts a NewLine Count value, this specifies the number of new line characters to be inserted.

Returns a character to represent a new line character within a text string. Multiple new line characters can also be returned.

Syntax

Available for DriveWorks Projects only. See New Project Wizard for information on project types.

NEWLINE([NewLine Count])

NewLine Count (optional) is the number of newline characters to insert.

The NewLine Count has a maximum value of 10000 that can be applied.

If the NewLine Count value exceeds the maximum the function will revert to 10000.

Examples

RuleMeaning
"Hello" & NEWLINE( ) & "World"

Returns:

Hello

World

"Hello" & NEWLINE(2) & "World"

Returns:

Hello

 

World

Rept

Repeats the specified text n number of times.

The Repeat Quantity has a maximum value of 10000 that can be applied.

If the Repeat Quantity value exceeds the maximum the function will revert to 10000.

Syntax

Available for DriveWorks Projects only. See New Project Wizard for information on project types.

REPT( [Text], [Number of Times] )

Repeats the specified text n number of times.

Text is the string to repeat.

Number of Times is the number of times to repeat the specified text by.

Examples

Rule

Meaning
REPT("F", 6)This function repeats the string "F" six times, which will return "FFFFFF" as the result.
REPT("F", 10001)This function repeats the string "F" 10000 times, the repeat quantity limit is 10000

Example Outcomes

Text

Number of Times

Outcome
"_"10__________ (Uses the underscore symbol to create a horizontal line)
"Delete"0"" (the text is omitted)
"-TEST-"5-TEST--TEST--TEST--TEST--TEST-

Ceiling

Rounds a number up to the nearest specified significance.

The Ceiling function will round negative numbers.

Syntax

CEILING( [Number], [Significance] )

Number is the number to round.

Significance is the number to which this function finds the nearest (higher valued) multiple of.

Examples

Rule

Meaning
CEILING(123.456, 9)Rounds the number 123.456 up to the nearest multiple of 9. The resulting value is 126.

Floor

Rounds a number down to the nearest specified significance.

The Floor function will round negative numbers.

Syntax

FLOOR( [Number], [Significance] )

Number is the number to round.

The significance is the number to which this function finds the nearest (lower valued) multiple of.

Examples

Rule

Meaning
FLOOR(123.456, 9)Rounds the number 123.456 down to the nearest multiple of 9. The resulting value is 117.

TableSort

Returns a table sorted on the given column.

The TableSort function will return a table array with the values sorted on the given column.

Syntax

TableSort(Table or Table Name As Object, Column As Double, Has Headers As Boolean, Sort Ascending As Boolean) As Object

Where:

Table or Table Name is a Table array (such as the data in a standard table).

Column is the column on which to base the sort. Number starting at 1 for the first column.

Has Headers is TRUE will treat the first row as headers (therefore exclude from the sort). FALSE will sort the entire table (including the first row).

Sort Ascending is TRUE to to sort in ascending order, FALSE to sort in descending order.

Examples

RuleMeaning
ListAll(TableSort(DwTableName,2,FALSE), 3)Will list all data from the third column of the array returned by the SortTable function.

AngleAbs

Returns the absolute value of an angle in radians.

Syntax

AngleAbs(Angle)

Where:

Angle is the angle, in radians, for which you want the absolute value.

Examples

RuleMeaning
AngleAbs(-0.785398163397448)Will return the absolute angle in radians, the result of which will be 5.49778714378214.

AngleAbsD

Returns the absolute value of an angle in degrees.

Syntax

AngleAbsD(Angle)

Where:

Angle is the angle, in degrees, for which you want the absolute value.

Examples

RuleMeaning
AngleAbsD(-45)Will return the absolute angle in degrees, the result of which will be 315.


See also

Rules Insight Escape and Retain Variable Category

Welcome to DriveWorks Solo 11 What's New