WHATS WRONG WITH THIS CODE?
karazeh2006
Sun Oct 5 18:44:48 PDT 2008
this code will be a class to create a tstringlist like in delphi
this is the class file
TYPE TSTRINGLIST
DIM DYNAMIC SLIST$[0]
ICOUNT
SS$
SUB CREATELIST(THIS AS TSTRINGLIST_CLASS)
SUB FREELIST(THIS AS TSTRINGLIST_CLASS)
END TYPE
SUB CREATELIST(THIS AS TSTRINGLIST_CLASS)
THIS.ICOUNT=0
THIS.SS$="HELLO"
END SUB
SUB FREELIST(THIS AS TSTRINGLIST_CLASS)
FREE DYNAMIC THIS.SLIST$
END SUB
******************************************************
and i used another file to test:
$INCLUDE "E:\stringlist\STRINGLIST.BAS"
DIM A AS TSTRINGLIST
A.CREATELIST(&A)
PRINT "COUNT=", A.ICOUNT
PRINT "SS$=", A.SS$
A.FREELIST(&A)
KEYPRESS
************************************************
it compiles ok but when executing the program it
doesn't show any thing and exits execution imediatly...why?
thanks for help
More information about the BCX
mailing list