Page 1 of 1

Questions

Posted: Thu Sep 21, 2017 11:58 am
by rbytes
Is there a file delete command?
I just searched the Files section and didn't see one.

Is there a command to give the size of an array? In the Save Font Names program I just posted, I used the #.fontlist command to create
an array containing all font names. But I didn't know how to read its size. I tried using, #.size(), but it just gave me the number of dimensions (1), not the number of elements. When I used #.writelines() to write the array to a file, I still could not figure out how many lines were written, so I could not add the line "x files written".

Re: Questions

Posted: Thu Sep 21, 2017 1:24 pm
by Mr. Kibernetik
Function #.size returns number of elements in each dimension if to specify the dimension number as a second parameter. For one-dimensional array A it will be:

Code: Select all

#.output(#.size(a,1))

Re: Questions

Posted: Thu Sep 21, 2017 1:35 pm
by rbytes
Thanks. I will implement this.

Any way to delete a file?

Re: Questions

Posted: Thu Sep 21, 2017 1:36 pm
by Mr. Kibernetik
rbytes wrote:
Thu Sep 21, 2017 1:35 pm
Thanks. I will implement this.

Any way to delete a file?
No.
Good suggestion.