Products Downloads


French version


 

 

ADELIA

VADELIA

SADELIA

WADELIA

EADELIA

(I/B)

(I/B)

(B)

(I/B)

(B)

 

Description

This predefined function is used to justify a character string by specifying a left margin, a right margin and the maximum number of blank characters that can be inserted between each word.

The separator between each word is the blank character.

 

Syntax

Result = &JUSTIFICATION(String;Left margin;Right margin;Max. blanks between each word).

 

Parameters

 

Description

Contents

Controls

Result

Alphanumeric variable.

Character string justified.

The result field is cleared before the function is run.

 

String

Alphanumeric constant or variable.

Character string for which justification is to be performed.

Mandatory parameter.

Left margin

Positive numeric integer constant or variable.

Number of characters to be positioned before the first word in the character string.

Mandatory parameter.

Right margin

Positive numeric integer constant or variable.

Number of characters to be positioned after the last word in the character string.

Mandatory parameter.

Max. blanks between each word

Positive numeric integer constant or variable.

Maximum number of blank characters that can be placed between each word in the character string.

Mandatory parameter.

 

Note: If the field "Max. blanks between each word" is equal to zero, all the words in the original string is concatenated (but margins are not modified).

When this function is used in a simple assignment, the words are justified in relation to the result variable. When this function is used in a concatenation expression, the justification is performed in relation to an internal variable that is the same size as the function's String parameter.

 

Example

STRING = 'UPDATE OR CREATE ORDERS '

LEFT = 4

RIGHT = 4

SPACES = 1

NEW_STRING = &JUSTIFICATION(STRING;LEFT;RIGHT;SPACES)

*

* The NEW_STRING is equal to: °°°°UPDATE°OR°CREATE°ORDERS°°°°°°°°°

*

SPACES = 3

NEW_STRING = &JUSTIFICATION(STRING;LEFT;RIGHT;SPACES)

*

* The NEW_STRING is equal to: °°°°UPDATE°°OR°°CREATE°°ORDERS°°°°°

* (two SPACES only between each word, there is not enough room for three)

 

List of predefined functions by topic

 

↑ Top of page

  • Aucune étiquette