$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 FILESPEC(BYVAL OPT AS STRING, BYVAL FSNAME AS STRING) AS STRING DECLARE FUNCTION XWORD(BYVAL W$,BYVAL WN, BYVAL SCHAR) AS STRING DECLARE FUNCTION XWORDS(BYVAL F$,BYVAL CHAR) AS INTEGER '/*------------------------------------------------------------------*/ $CODE SEG "MLIB6" '/*------------------------------------------------------------------*/ ' Creates file *.htm from f$.* ' Example: MKHTMLTBL "D:\DATA\UNION\ACTION\JUN01.CSV","skiblue","," '/*------------------------------------------------------------------*/ SUB MKHTMTBL(F$,BGCOLOR$,DELIM$) PUBLIC IF BGCOLOR$ = "" THEN BGCOLOR$ = "skiblue" IF DELIM$ = "" THEN DELIM = 44 ELSE DELIM = ASC(DELIM$) FS$ = FILESPEC("M",F$)+".HTM" FIN = FREEFILE OPEN"I",FIN,F$ FOUT = FREEFILE OPEN"O",FOUT,FS$ T2$ = "
"+XWORD(T$,CNT,DELIM)+" | " NEXT CNT T2$ = T2$ + "