Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I search directories using Irie Pascal?

Directories irie Pascal search
0
Posted

How do I search directories using Irie Pascal?

0

Answer. In Irie Pascal directories are just lists of filenames (I am using the term list in the general sense, I’m not referring to the special list type defined in the Irie Pascal programming language). Most operating systems don’t allow you to manipulate directories using the file procedures, so Irie Pascal provides a separate group of procedures for manipulating directories. These procedures are “opendir”, “readdir”, “rewinddir”, and “closedir”. Before you can use a directory you have to open it using “opendir”. Once a directory is opened, you can use “readdir” to read the name of a file in the directory (starting with the first file). Each time you use “readdir” it advances to the next file. “rewinddir” moves back to the first file. When you have finished reading the directory you should close it using “closedir”. The sample program “listdir.pas” is a simple program that shows how to use most of the built-in directory procedures. Take a look at “listdir.pas” (in the samples directo

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123