In splitting up a large program into a main program and a number of re-usable library files, it is not too surprising that I have made errors in the imported files. Unfortunately, error messages report the line number of the assembled file, as if the source was one file.
As the imported files cannot be seen except as separate files, it is not clear to which lines the errors refer. If the error is obvious then this is not a problem, but the code may look correct and so there is then doubt over where to look. Could errors please refer to the file and line within the file?
Importation is a great thing to have and will make code reuse easier, but this makes it a bit tricky.
Errors in IMPORT files
- cicciocb
- Site Admin
- Posts: 2781
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 592 times
- Been thanked: 1990 times
- Contact:
Re: Errors in IMPORT files
HI Stuart,
the error message raised by Annex includes the line number of the "imported" file and, if this file is currently opened into another TAB, it is automatically shown and the corresponding line highlighted.
As this do not seems to be the case for you, can you give more details?
This is an example of error present inside a library
the error message raised by Annex includes the line number of the "imported" file and, if this file is currently opened into another TAB, it is automatically shown and the corresponding line highlighted.
As this do not seems to be the case for you, can you give more details?
This is an example of error present inside a library
You do not have the required permissions to view the files attached to this post.
-
- Posts: 177
- Joined: Fri Feb 19, 2021 7:46 pm
- Location: Chester, UK
- Has thanked: 8 times
- Been thanked: 25 times
Re: Errors in IMPORT files
Thanks, this is very strange - when I created an error to force the message, it worked as I would expect and you said it should. But when I reported the problem it was because I got an error at line 572 in a file of 505 lines with an import file that was not mentioned. I couldn't see an obvious error on line 67 of the other file. I'll grab an image if it happens again!
Edit: It might have been before I flashed 70.3, could 70.1 have been the culprit?
Edit: It might have been before I flashed 70.3, could 70.1 have been the culprit?
- cicciocb
- Site Admin
- Posts: 2781
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 592 times
- Been thanked: 1990 times
- Contact:
Re: Errors in IMPORT files
There is a little change in the 70.3 that should not affect the behavior.[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Thu Dec 05, 2024 3:13 pm Thanks, this is very strange - when I created an error to force the message, it worked as I would expect and you said it should. But when I reported the problem it was because I got an error at line 572 in a file of 505 lines with an import file that was not mentioned. I couldn't see an obvious error on line 67 of the other file. I'll grab an image if it happens again!
Edit: It might have been before I flashed 70.3, could 70.1 have been the culprit?
Anyway, let me know if this happens again.
-
- Posts: 177
- Joined: Fri Feb 19, 2021 7:46 pm
- Location: Chester, UK
- Has thanked: 8 times
- Been thanked: 25 times
Re: Errors in IMPORT files
I have also just noticed that if I edit the imported file I have to reopen the main file before it will find the new version. Not too surprising but perhaps a warning would help?
- cicciocb
- Site Admin
- Posts: 2781
- Joined: Mon Feb 03, 2020 1:15 pm
- Location: Toulouse
- Has thanked: 592 times
- Been thanked: 1990 times
- Contact:
Re: Errors in IMPORT files
Normally if you save the imported file, the main should be automatically reloaded.
Be sure that the main always has the "green" tab
edit : I'm not sure about that (must check ..)
re-edit : yes, it works like that : if a file is imported, when saved the whole main program is reloaded again
Be sure that the main always has the "green" tab
edit : I'm not sure about that (must check ..)
re-edit : yes, it works like that : if a file is imported, when saved the whole main program is reloaded again