$CPU 8086 ' make compatible with XT systems $LIB ALL OFF ' turn off all PowerBASIC libraries $ERROR ALL OFF ' turn off all PowerBASIC error checking $OPTIMIZE SIZE ' optimize for smaller code $COMPILE UNIT ' compile to a UNIT (.PBU) '$COMPILE EXE ' compile to a UNIT (.PBU) DEFINT A-Z ' Required for all numeric functions, forces PB to not ' include floating point in UNIT (makes it smaller) '/*------------------------------------------------------------------*/ DECLARE FUNCTION BROWSE(BYVAL TopView%, BYVAL LeftView%, BYVAL ATTR, BYVAL A$, BYVAL BottomView%, BYVAL RightView%, BYVAL K$, BYVAL BOXATTR%, BYVAL BOXTYPE%, BYVAL DMOUSE%) AS STRING '/*-----------------------------------------------------------------*/ $CODE SEG "MLIB4" '/*-----------------------------------------------------------------*/ ' BROWSEA(ATTR,D$(),ROW,COL,NROW,NCOL,KEY$,BATTR,BTYPE,MF) ' Browse an ARRAY. ' Displays the contents of D$() array. You MUST load the number ' of elements into D$(0), the zeroth element. Returns exit key. ' ATTR = Color of text. ' D$() = Array passed to browser. ' ROW = Top row of browse window. ' COL = Left column of browse window. ' NROW = Number of rows to show. ' NCOL = Number of columns to show. ' KEY$ = Keys that will exit browser. ESC is the default. ' BATTR = Color of box around browse window. ' BTYPE = Type of box around browse window. (See TBOX for types). ' MF = Use Mouse: ' 0 = No ' 1 = Yes ' EXAMPLE: T$ = BROWSEA(31,G$(),3,3,22,78,"",12,1,1) ' | | | | | | | | | +- Use Mouse ' | | | | | | | | +- Single Line ' | | | | | | | +- Red Box ' | | | | | | +-- Until ESC key pressed ' | | | | | +-- # Columns ' | | | | +----- # Rows ' | | | +------- First Display Column ' | | +--------- First Display Row ' | +-------------- String Array to Display ' +----------------- Text Color ' '/*-----------------------------------------------------------------*/ FUNCTION BROWSEA(BYVAL ATTR, D$(), BYVAL TopView%, BYVAL LeftView%, BYVAL BottomView%, BYVAL RightView%, BYVAL K$, BYVAL BOXATTR%, BYVAL BOXTYPE%, BYVAL DMOUSE%) PUBLIC AS STRING N = VAL(D$(0)) A$ = "" FOR CNT = 1 TO N A$ = A$ + D$(CNT) + CHR$(13) + CHR$(10) NEXT CNT FUNCTION = BROWSE(TopView%, LeftView%, ATTR, A$, BottomView%, RightView%, K$, BOXATTR%, BOXTYPE%, DMOUSE%) END FUNCTION '/*-----------------------------------------------------------------*/ ' $INCLUDE "C:\CODE\MLIB\MLIB.INC" ' DIM D$(100) ' CLS ' F$ = "C:\BATCH\NORMAL.BAT" ' F2A F$,D$() ' KT$ = CHR$(27) + CHR$(00,62) ' T$ = BROWSEA(31,D$(),1,1,22,78,KT$,31,7,1)