Hello All,
I have attached a ZIP archive of a small sample program. If you are going to attempt to run the sample code please remember to transfer the file "mylist" (an ascii file) into the application directory on your PDA (\my documents\ppl on a standard setup).
As coded the sample program reads information from the ascii text file (mylist) and loads it into a structured list and then performs a "ShowList" to display the contents of the loaded list. This "test" is initiated by selecting TESTS/TEST #1 from the main menu).
Question 1:
-----------
You will note from the ascii text file that the info is read in order 160,161,162,180,181,182,200,201,202.
The information is displayed from the list (using foreach (MyList$)) and shows the last element read (202) as the first element in the list. The others are in correct order.
Why?
Question 2:
-----------
If you examine my code the "ShowMyList" is called on the completeion of the "LoadMyList" procedure (in file "MyList.PPL").
If you would comment out this line - "ShowMyList" and then go to the file "Testing.PPL" where you will find a routine "DoTestProc1". Uncomment the line "ShowMyList" in that procedure and re-run the program.
Note that the only difference to our previous program is that the list is displayed now immediately after exiting the "LoadMyList" procedure.
In this example the list genereated is seriously corrupted.
Why?
In both these cases I feel there must be something basic I am doing wrong. I have spent quite some time looking at alternatives approaches to attempt to unveil my error without success. Any comments or hints from other beta testers would ne much appreciated.
I have attached a ZIP archive of a small sample program. If you are going to attempt to run the sample code please remember to transfer the file "mylist" (an ascii file) into the application directory on your PDA (\my documents\ppl on a standard setup).
As coded the sample program reads information from the ascii text file (mylist) and loads it into a structured list and then performs a "ShowList" to display the contents of the loaded list. This "test" is initiated by selecting TESTS/TEST #1 from the main menu).
Question 1:
-----------
You will note from the ascii text file that the info is read in order 160,161,162,180,181,182,200,201,202.
The information is displayed from the list (using foreach (MyList$)) and shows the last element read (202) as the first element in the list. The others are in correct order.
Why?
Question 2:
-----------
If you examine my code the "ShowMyList" is called on the completeion of the "LoadMyList" procedure (in file "MyList.PPL").
If you would comment out this line - "ShowMyList" and then go to the file "Testing.PPL" where you will find a routine "DoTestProc1". Uncomment the line "ShowMyList" in that procedure and re-run the program.
Note that the only difference to our previous program is that the list is displayed now immediately after exiting the "LoadMyList" procedure.
In this example the list genereated is seriously corrupted.
Why?
In both these cases I feel there must be something basic I am doing wrong. I have spent quite some time looking at alternatives approaches to attempt to unveil my error without success. Any comments or hints from other beta testers would ne much appreciated.
Attachments:
sample.zip (7 KB)