To initialize a big array with a certain value this is the only method i found :
( set 'pic ( array 100 100 ( sequence 3 3 ) ) )
1. Is there any other method to initialize it to a certain number or a string ?
2. How can i stop the output in the console-window while the array
is evaluated ?
PS: As you can imagine i want this for a byte-map for simple graphics . The size could be eg. 1000 x 1000 later .
arrays
You could just do:
Code: Select all
(set 'pic (array 100 100 '(3)))
to get rid of displaying the return value from the array statement, just wrap any other functin around it:
of course this is only a problem when executing the statement interactively. Inside a program you wouldn't see anything which isn't printed explictely.
or you can use 'silent':
it suppresses everything, including the prompt, so hit <enter> to get the prompt back.
Lutz
see also: http://newlisp.org/downloads/newlisp_manual.html#array
Code: Select all
(time (set 'pic (array 100 100 '(3))))
or you can use 'silent':
Code: Select all
(silent (set 'pic (array 100 100 '(3))))
Lutz
see also: http://newlisp.org/downloads/newlisp_manual.html#array