home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 24
/
CD_ASCQ_24_0995.iso
/
vrac
/
homonlib.zip
/
CENTER.BAS
< prev
next >
Wrap
BASIC Source File
|
1995-04-13
|
664b
|
20 lines
DEFINT A-Z
DECLARE SUB Center (row, text$)
SUB Center (row, text$)
'****************************************************************************
'Centers text on the specified row.
'****************************************************************************
col = 41 - (LEN(text$) \ 2) 'Calculate the column to place text at.
IF col < 1 THEN col = 1 'Avoid an error if text$ is really long.
LOCATE row, col 'If row is illegal, its the programmer's fault!
PRINT text$; 'Use the semicolon in case we're on row 24 -
'It will prevent the screen from scrolling up.
END SUB