' ===========================================================================
'   FILE: CPRINT.DIS
'
'   Support routines for QuickBASIC 4.5.
'
'           Copyright (c) 1991
'           Daniel R. Berry (Traveller Software)
'           All Rights Reserved
'
'   This code is released to the Public Domain for distribution with the
'   QBNews.
'
'   Daniel R. Berry
'   3110-C S. Gen McMullen
'   San Antonio, TX  78226
'

' ===========================================================================
'   SUBPROGRAM: CPrint
'   Version 1.2  By: Dan Berry (c) Traveller Software 1987 - 1991
' =========================== CPrint SubProgram =============================
SUB CPrint (Row%, Col%, Fore%, Back%, Prompt$)
	DEFINT A-Z
	COLOR Fore, Back    '   Set the text color
'
'   Center the string if required
'
	PCol = Col
	IF Col = 0 THEN PCol = 40 - INT(LEN(Prompt$) / 2)
	IF Col < 0 THEN PCol = ABS(Col) - INT(LEN(Prompt$) / 2)
	LOCATE Row, PCol: PRINT Prompt$; '   Locate and Print
' ========================= End of Cprint SubProgram ========================
	END SUB

