Explaining what my function does may not be easy. The first two paragraphs here explain the principle
https://en.wikipedia.org/wiki/Indexing_head
As it mentions one rotation of a handle turns work through some angle. What isn't clear is how the index plates work.They have rings of holes of various counts and a peg locates in them. That way fractional turns can be made to provide various divisions per complete rotation of the work.
The function takes in the hole counts in the index plate and works out all of the division that can be done over a range of them. Essentially the hole counts on the plates are based on prime numbers and those set what the plate can do. There are some spread sheets about and applications that will do this but as it's prime number based it isn't unusual for rounding errors to miss divisions. I've got round that by doing it in pure integer using mod and quotient. This way it also means I only have to check 3 trial values to be sure all value it gives will be ok. It also only generates divisions that can be done.
Some people do it by having a column of divisions just numerically ascending, 2,3,4 ..... and so on up to a few hundred and then use spread sheet functions to see if they can be done so some rows can't. The plate I am using to test the code with can provide divisions up to 3,660 and the gaps it can't do gets bigger bigger as the divisions go up so the usual approach people use isn't very convenient.
As it appears that a function can only return one value I have concatenated them into one long string. It can be pretty long. I haven't counted characters but the results generated into B23 run up to BU. Then comes the messy aspect I mentioned in paragraph 2 of my 1st post. Converting that into a table. Even being able to make the function put the result into a cell other than the one it's in would help with that.
While I can read up on an use things like sheet. etc etc I feel that there aught to be a more Basic like way of doing the same thing and that there probably is or was but can't find any documentation on it at all. It was difficult to find any on reading the hole counts on the index plate being done. I did find 2 examples eventually. In both cases the data is passed as a range of cells and either for Lbound to Ubound or a sort of for all in where used to get the actual data. Surely there is something similar for writing results back to the spread sheet. However the results are digits in groups of 4 and the number of them will vary. It should be possible if needed to set a results space that is larger than ever is likely to be needed.
Out of interest I couldn't find a concise programmers star basic syntax reference guide either. Or even a wordy one. It's a language that I haven't used for a very long time so that did cause some problems. I have never used any of the other languages offered and don't really have the time to pick them up.
John
-