CENTRE@

Platform

x64, Win32

Purpose

To position a string in the centre of a field.

Syntax

CHARACTER (LEN=*) FUNCTION CENTRE@(STRING,IW)
CHARACTER (LEN=*) STRING
INTEGER (KIND=2) IW

Return value

CENTRE@ returns STRING after padding with blanks on the left so that the non-blank part is centred in a field of IW characters. This is very useful for titles.

Example

CHARACTER (LEN=80) CENTRE@
PRINT *,CENTRE@('FINAL RESULTS',80)

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited