Hi,
From difficult question to probably a simple one:
How to initialize a string
The string is defined at the TOP of the program
DEF mystring[1000]:string
The string is populated with a 1000 entries.
Is there a way to 'empty' mystring (up to a 1000 entries) without doing a
For x = 1 to 1000
mystring[ x ] = ""
Next loop ?
Thanks,
Andy.
STRINGNAME[0] = NULL ?
Brian
Thanks Brian
Will try that, did you get Avast sorted?
Andy.
the easiest is stringname="" if you are using the string in the conventional way.
If you are using it as a buffer and manipulating it with pointers you can use the API rtlzeromemory(mystring,len(mystring)) which is what I use all the time to make sure UDT's are zeroed out.
LarryMc
Andy,
I just knew Clever Knickers McCaughn would have a better answer than me !
But that's OK - we all learn something new every day
And, yes, I did get Avast sorted, thanks very much - it was as you pointed out
Brian
Quote from: Brian Pugh on April 04, 2012, 12:03:55 PM
... we all learn something new every day...
Including me. But in my case it it usually something I learned and forgot from the day before. :o
LarryMc
Now now ladies! :) :)
Larry, your first option worked - Thanks!
Any chance you could have a look at my other problem?
Entry point _ftol2 not located, but it's okay if your very busy.
The function isn't included in the MSVCRT.dll for Windows XP but is for Win 7 and Vista.
Could really do with finding a solution to this, I have a work around but it's not as good.
Thanks,
Andy.