[Seed7-users] Beginner questions
Interpreter and compiler for the Seed7 programming language.
Brought to you by:
thomas_mertes
From: L. S. <lsp...@gm...> - 2020-11-30 19:56:09
|
The official documentation is not bad, quite good actually, but it's like it's not really enough for a beginner. So I appreciate any answer I get. I'm trying to write a program to read elf-files. I can read the headers of 32bit files but would like to extend it a bit. 64bit will be easy to add afterwards. 1. Currently I read the data and then extracts every field from the string. I wrote my own function to handle little-endian but with bytedata.s7i <http://seed7.sourceforge.net/libraries/bytedata.htm> it all got much cleaner and easier. But...Could I read the data directly into my structure (like in C and ASM) or do I always have to insert it myself? 2. When I read the section table (from the elf file) I get some types and would like to have an array of pointers to functions. If the type is 1 I call myarray[1](), if it is 2 I call myarray[2](); Can I do that? I can use a 'case-statement' but when you have many possibilities it becomes a bit long. 3. How does "type" work? Is it just like "typedef"? Is it just an alias? |