Skip to content
This repository was archived by the owner on Jan 26, 2022. It is now read-only.

Listing programs

Peter Tillema edited this page Dec 1, 2018 · 1 revision

Sometimes you want to list all the available files on calc, and often that are programs, for example when you create a shell or IDE. This is pretty easy with ICE, but you need to know it, so let's see what the possibilities are. We already have DetectVar( and Detect(, so let's use them. The documentation says the first argument is POS where it should be 0 if the want to find the first variable. Let's use this to create a small code snippet to find all the available programs, and open them!

0→POS
While DetectVar(°POS,0,5)→PROG
    OpenVar(PROG,"r",5)→SLOT
    ...
End

You can use DetectVar( recursively, because POS gets automatically updated to find the next program.

Note: The programs are found as how they are stored in the VAT, not alphabetically!

Clone this wiki locally