Article ID: 172096
Article Last Modified on 11/18/2003
**** Create sample programs ****
FOR i= 1 TO 200
lcname1="main" + maknum(i) + ".prg"
COPY FILE main000.prg TO &lcname1
ENDFOR
**** Create sample forms ****
FOR i= 1 TO 200
lcname1="main" + maknum(i) + ".scx"
lcname2="main" + maknum(i) + ".sct"
COPY FILE main000.scx TO &lcname1
COPY FILE main000.sct TO &lcname2
ENDFOR
PROCEDURE maknum
PARAMETERS tnWhich
RETURN PADL(ALLTRIM(STR(m.tnWhich)),3,"0")
&&***Top of MAIN000.PRG****
RETURN
DO MYINIT
DO MYSAVE
DO FORM main
READ EVENTS
PROCEDURE myinit
LOCAL x00,x01,x02,x03,x04,x05,x06,x07,x08,x09
LOCAL x10,x11,x12,x13,x14,x15,x16,x17,x18,x19
STORE 9 TO x00,x01,x02,x03,x04,x05,x06,x07,x08,x09
STORE 9 TO x10,x11,x12,x13,x14,x15,x16,x17,x18,x19
RETURN
PROCEDURE mysave
LOCAL x00,x01,x02,x03,x04,x05,x06,x07,x08,x09
LOCAL x10,x11,x12,x13,x14,x15,x16,x17,x18,x19
LOCAL x20,x21,x22,x23,x24,x25,x26,x27,x28,x29
STORE 9 TO x00,x01,x02,x03,x04,x05,x06,x07,x08,x09
STORE 9 TO x10,x11,x12,x13,x14,x15,x16,x17,x18,x19
STORE 9 TO x20,x21,x22,x23,x24,x25,x26,x27,x28,x29
RETURN
&&***End of MAIN000.PRG****
Save the program into the same directory (..\BigProj) as the program
file created in step 1. This is a sample program whose contents will be
copied into all the sample program files created by MakMor.prg.
IF !file("main.prg")
FHAND=fcreate("main.prg")
FCLOSE(fhand)
ENDIF
fhand = FOPEN("main.prg",11)
?"fhand = ",fhand
IF FHAND >= 0
FOR i=1 TO 200
fnum=PADL(ALLTRIM(STR(i)),3,"0")
FPUTS(fhand, "Do Main"+(fnum))
** Uncomment the following if forms added to the project **
fputs(fhand, "Do Form Main"+(fnum))
ENDFOR
ENDIF
FCLOSE(fhand)
Save the program to the same directory (..\BigProj) as the previous
step. This program creates MAIN.PRG that contains references to all the
forms and programs created by MakMor.prg.
SET DEFAULT TO <..\BigProj> ** Set default to where all files saved
DO MakMor.prg **Make sample programs and files
DO MNDAT.prg **Create Main.prg with references to files
Keywords: kbbug kbfix kbvfp500fix KB172096