Please enable JavaScript to view this site.

This program takes parameter one and will add a suffix (parameter two) and/or prefix (parameter three) to it and pass it back in Parameter one. This can be useful if you wish to add a pound sign or credit sign to numeric data. You also have the option of adding a space between the Prefix and the parameter string (parameter four) or a space between the parameter string and the Suffix (parameter five).

The parameters are as follows:

Parameter

Description

Comments

PARM1

Data String

The data string that you wish to format e.g.    12,345.00

PARM2

Prefix

e.g. £ (maximum length 10 characters)

PARM3

Suffix

e.g. CR or - (maximum length 10 characters)

PARM4

Space after Prefix

Y if you wish to add a space between the Prefix and the Data String or Blank if not.

PARM5

Space before Suffix

Y if you wish to add a space between the Data String and the Suffix or Blank if not.

PARM6

Not used


Note: If the Data String passed in parameter one has leading blanks then these are honoured when the string is reformatted. This is to ensure that if you were passing a vertical list of numeric entries, one at a time, into the program the resulting output strings will still line up vertically.E.g.

PARM1 Input

PARM1 Output

   1,234.00

   [£1,234.00-]

  12,234.00

  [£12,234.00-]

     234.00

     [£234.00-]

       4.00

       [£4.00-]

       0.04

       [£0.04-]

Example 1

Parameter

Input

Output

PARM1

   1,234.00

   [£ 1,234.00-]

PARM2


PARM3

-]


PARM4

Y


PARM5



PARM6



Example 2

Parameter

Input

Output

PARM1

   1,234.00

   £1,234.00 CR

PARM2

£


PARM3

CR


PARM4



PARM5

Y


PARM6