$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) '/*------------------------------------------------------------------*/ $CODE SEG "MLIB4" '/*------------------------------------------------------------------*/ ' CSA2SA SARRAY$(),DARRAY$() ' Copy String Array to String Array. ' EXAMPLE: CSA2SA A$(), B$() '/*------------------------------------------------------------------*/ SUB CSA2SA(SARRAY$(),DARRAY$()) PUBLIC N = VAL(SARRAY$(0)) FOR CNT = 1 TO N DARRAY$(CNT) = SARRAY$(CNT) NEXT CNT DARRAY$(0) = STR$(N) END SUB '/*------------------------------------------------------------------*/ ' $INCLUDE "C:\CODE\MLIB\MLIB.INC" ' CLS ' DIM S1$(100) ' DIM D1$(100) ' F2A "C:\AUTOEXEC.BAT",S1$() ' CSA2SA S1$(),D1$() ' T = VAL(D1$(0)) ' FOR CNT = 1 TO T ' PRINT D1$(CNT) ' NEXT CNT ' INPUT Z