$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" '/*------------------------------------------------------------------*/ ' CNA2NA SARRAY(),DARRAY() ' Copy Numeric Array to Numeric Array. ' EXAMPLE: CNA2NA A(), D() '/*------------------------------------------------------------------*/ SUB CNA2NA(SARRAY(),DARRAY()) PUBLIC N = SARRAY(0) FOR CNT = 1 TO N DARRAY(CNT) = SARRAY(CNT) NEXT CNT DARRAY(0) = N END SUB '/*------------------------------------------------------------------*/ ' $INCLUDE "C:\CODE\MLIB\MLIB.INC" ' CLS ' DIM S1(100) ' DIM D1(100) ' FOR CNT = 1 TO 100 ' S1(CNT) = CNT ' NEXT CNT ' S1(0) = 100 ' CNA2NA S1(),D1() ' FOR CNT = 1 TO D1(0) ' PRINT D1(CNT) ' NEXT CNT ' INPUT Z