--- Quote Start ---
This was an example that's why i don't declare an
output.As far the result of this code is correct.And the count statement also
works.Do you have any suggestion on how to do this(what i described in the previous post)?
--- Quote End ---
What you wrote will work.
rbugalho is very correct though when it comes to resource usage. your code would map to ALOT of memories with alot of wasted memory (ie memory you can no longer access AT ALL). This is the problem when you dont understand the underlying hardware - it becomes very inneficient and very wasteful!