Back to Forum | View unanswered posts | View active topics
Topic review - Looking at code in the libraries |
Author |
Message |
|
|
Post subject: |
Re: Looking at code in the libraries |
|
|
Ravi wrote: I had opened the finvar.lib file using TextPad (a text editor on Windows) and it actually appears as a binary file there! Maybe something about the way TextPad treats the lib extension?
Right .lib means static library on Windows, so it is assumed to be something binary. Also text files are different (different end of line markers) between Windows and Unix, and therefore some Windows-editors cannot deal with them (notepad can't, while wordpad can). Regards, Alexander
[quote="Ravi"] I had opened the finvar.lib file using TextPad (a text editor on Windows) and it actually appears as a binary file there! Maybe something about the way TextPad treats the lib extension? [/quote] Right .lib means static library on Windows, so it is assumed to be something binary. Also text files are different (different end of line markers) between Windows and Unix, and therefore some Windows-editors cannot deal with them (notepad can't, while wordpad can).
Regards, Alexander
|
|
|
|
Posted: Tue Jul 28, 2009 8:42 am |
|
|
|
|
|
Post subject: |
Re: Looking at code in the libraries |
|
|
Hello, Yes, I am calling the procedure before calling the write function. (And the second argument is string(proc_name).)
I had opened the finvar.lib file using TextPad (a text editor on Windows) and it actually appears as a binary file there! Maybe something about the way TextPad treats the lib extension?
I checked that it is a plain text file in another plain text editor.
Thanks Ravi
Hello, Yes, I am calling the procedure before calling the [i]write[/i] function. (And the second argument is [i]string(proc_name)[/i].)
I had opened the finvar.lib file using TextPad (a text editor on Windows) and it actually appears as a binary file there! Maybe something about the way TextPad treats the lib extension?
I checked that it is a plain text file in another plain text editor.
Thanks Ravi
|
|
|
|
Posted: Tue Jul 28, 2009 5:23 am |
|
|
|
|
|
Post subject: |
Re: Looking at code in the libraries |
|
|
Dear Ravi,
how do you detect that finvar.lib file in the LIB folder is a binary file (with text annotations)?
AFAIK, LIB/*.lib should be plain text files. If you cannot read/edit them with a plain text editor then something went wrong...
Besides, you still need to call you procedure before doing: "write("a-file-name.txt", name-of-procedure);"
Regards, Oleksandr
Dear Ravi,
how do you detect that finvar.lib file in the LIB folder is a binary file (with text annotations)?
AFAIK, LIB/*.lib should be plain text files. If you cannot read/edit them with a plain text editor then something went wrong...
Besides, you still need to call you procedure before doing: "write("a-file-name.txt", name-of-procedure);"
Regards, Oleksandr
|
|
|
|
Posted: Mon Jul 27, 2009 7:37 pm |
|
|
|
|
|
Post subject: |
Re: Looking at code in the libraries |
|
|
Hello, The finvar.lib file in the LIB folder is a binary file (with text annotations), so I found it easier to use the "string" command suggested by Oleksandr. The string command only prints to the terminal, so to print to file for easy reading, do this: Code: > write("a-file-name.txt", name-of-procedure)
Thanks for the help, Ravi
Hello, The finvar.lib file in the LIB folder is a binary file (with text annotations), so I found it easier to use the "string" command suggested by Oleksandr. The string command only prints to the terminal, so to print to file for easy reading, do this: [code] > write("a-file-name.txt", name-of-procedure) [/code]
Thanks for the help,
Ravi
|
|
|
|
Posted: Mon Jul 27, 2009 6:32 pm |
|
|
|
|
|
Post subject: |
Re: Looking at code in the libraries |
|
|
Dear Ravi, you can get the code of any procedure (e.g. invariant_basis) via string(invariant_basis); but for this to work you have to call the procedure at least once. Therefore i suggest you to do the following: Code: LIB "finvar.lib"; // load lib example invariant_basis; // take a look at the example string(invariant_basis); // view its source
I hope that helps. Regards, Oleksandr
Dear Ravi,
you can get the code of any procedure (e.g. invariant_basis) via string(invariant_basis);
but for this to work you have to call the procedure at least once. Therefore i suggest you to do the following:
[code] LIB "finvar.lib"; // load lib example invariant_basis; // take a look at the example string(invariant_basis); // view its source [/code]
I hope that helps.
Regards, Oleksandr
|
|
|
|
Posted: Mon Jul 27, 2009 4:12 pm |
|
|
|
|
|
Post subject: |
Re: Looking at code in the libraries |
|
|
All the standard distributed libraries are contained in the LIB folder of your distribution. Since they are in plaintext, you may simply look for LIB/finvar.lib and then find the realization of "invariant_basis" by a search command.
All the standard distributed libraries are contained in the LIB folder of your distribution. Since they are in plaintext, you may simply look for LIB/finvar.lib and then find the realization of "invariant_basis" by a search command.
|
|
|
|
Posted: Mon Jul 27, 2009 11:55 am |
|
|
|
|
|
Post subject: |
Looking at code in the libraries |
|
|
Hello, How does one print out the code of procedures in the built-in libraries? For example, I want to examine the code of the procedure called "invariant_basis" in finvar.lib. Is that possible?
Ravi
Hello, How does one print out the code of procedures in the built-in libraries? For example, I want to examine the code of the procedure called "invariant_basis" in finvar.lib. Is that possible?
Ravi
|
|
|
|
Posted: Mon Jul 27, 2009 6:14 am |
|
|
|
|
|
It is currently Fri May 13, 2022 11:06 am
|
|