- Thomas Linder Puls
- VIP Member
- Posts: 1424
- Joined: 28 Feb 2000 0:01
- Thomas Linder Puls
- VIP Member
- Posts: 1424
- Joined: 28 Feb 2000 0:01
-
- VIP Member
- Posts: 452
- Joined: 5 Nov 2000 0:01
Can you send a screenshot using this technique?
https://www.howtogeek.com/226280/how-to ... indows-10/
https://www.howtogeek.com/226280/how-to ... indows-10/
- Thomas Linder Puls
- VIP Member
- Posts: 1424
- Joined: 28 Feb 2000 0:01
Before doing what I suggest below, please attach fa.txt here; I am curious about its format.
Secondly, try dropping the file on the IDE, so that it will open in our editor. If that works then make a change and save it again. That will change the file to utf-8 with an utf-8 byte-order-mark.
Secondly, try dropping the file on the IDE, so that it will open in our editor. If that works then make a change and save it again. That will change the file to utf-8 with an utf-8 byte-order-mark.
Regards Thomas Linder Puls
PDC
PDC
-
- VIP Member
- Posts: 452
- Joined: 5 Nov 2000 0:01
Try removing all the leading spaces before the facts.
Change the file from this:
To this:
Change the file from this:
Code: Select all
clauses
person("Judith",female).
person("Bill",male).
person("John",male).
person("Pam",female).
parent("John","Judith").
parent("Bill","John").
parent("Pam","Bill").
Code: Select all
clauses
person("Judith",female).
person("Bill",male).
person("John",male).
person("Pam",female).
parent("John","Judith").
parent("Bill","John").
parent("Pam","Bill").
-
- VIP Member
- Posts: 452
- Joined: 5 Nov 2000 0:01
Make sure that you have saved the fa.txt file in the family1 subdirectory, not in the EXE directory. The error message indicates that the file is not found where specified.
Regarding my earlier comment about leading spaces. Testing the project in VIP 7.5 shows that leading spaces do NOT cause a problem when consulting a data file.
When I tested this project I added a line to the last run clause to pause the display:
Code: Select all
reconsult("..\\fa.txt"), % leading "..\\" refers to the parent directory of the location where the family1.exe file is located.
When I tested this project I added a line to the last run clause to pause the display:
Code: Select all
run():-
stdIO::write("End of test\n"),
% NOTE: code below to pause output
_ = stdio::readLine().
- Thomas Linder Puls
- VIP Member
- Posts: 1424
- Joined: 28 Feb 2000 0:01
I tried to change a few names in the fa.txt file. I saved the new file but it keeps accessing the original. I checked the fa.txt in the IDE and it shows my change. (I changed the name "Judith" to "Joyce") Why is it still picking up the old version with Judith? The program runs OK but I can't get the data modified. Where exactly should the fa.txt file reside?
GDFBSN
-
- VIP Member
- Posts: 452
- Joined: 5 Nov 2000 0:01
If your code is unchanged from what you posted previously, then it is in your project directory:
Compare the time-stamps of the fa.txt file in the EXE directory and your project directory using Windows Explorer. The one you changed last is probably the one you want to edit.
It's almost always found in the last place you look.
Code: Select all
reconsult("..\\fa.txt")
It's almost always found in the last place you look.