Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
fill array
#1
hello i have ARRAY(int) e.create(8 8)

my macro fill it but sometimes, i want to fill it with zeros ("reset" it)

i can use

for i 0 8
,for j 0 8
,,e[i j]=0

but is there another way / command to do that?
#2
if you were just wanting to get rid of the contents you could always use the "create" function to burn it down an recreate it with the same number of dimensions and elements.
An old blog on QM coding and automation.

The Macro Hook
#3
Or use memset, but don't do it with str arrays.

Code:
Copy      Help
memset &e[0 0] 0 8*8*sizeof(int)


Forum Jump:


Users browsing this thread: 1 Guest(s)