Jump to content
Excelsior Forums

oo

Members
  • Content count

    0
  • Joined

  • Last visited

    Never

Community Reputation

0 Neutral

About oo

  • Rank
    Newbie
  • Birthday 01/01/01
  1. Thanks a lot

    You are welcome sleepyhead O.O.
  2. Thanks a lot

    Hi, I just wanted to say thank you for all the help I received in this forum. I needed to help my professor compile some of his old Modula 2 code written for TopSpeed Modula2. I think I finished this job at the end of last week. I did have some problems ? but I think they are with the code itself ? not with the compilation. I would like to especially thank sleepyhead for helping me through all of this. I don?t think I would get back into Modula2 at least for the next few months ? or possibly forever. Regards, O.O.
  3. Dear sleepyhead, Thanks for your reply. I am sorry I could not get back to you earlier ? I am in the middle of my exams. I think the addition of the *.exe was the problem. Another problem was one of the executables was being called with the wrong parameters ? I don?t know why this was wrong though. This thing still does not work completely ? but I am working on it. Thank you for your help O.O.
  4. Hi, I wanted to add that as is defined as: as:Strin and from another module: Strin = ARRAY [0..inlen] OF CHAR; I looked into Lib.def inside TS and it shows me: PROCEDURE Exec (command :ARRAY OF CHAR; Params :ARRAY OF CHAR; Env :ExecEnvPtr) :CARDINAL; So is the problem with as or with the NIL for Env? Thanks a lot. O.O.
  5. Hi, Thank you guys for helping me in the past. I have yet not got my thing to work ? but I have a question: How do I call an external executable from Modula 2? In TopSpeed my code has FROM Lib IMPORT Exec; --> For the Import Statement And i:=Exec("hh_prog",as,NIL); For calling the external executable ?hh_prog.exe? Is this correct?, because it seems that my external executables are not getting called. Thanks again for your help. O.O.
  6. Thanks to the two of you for your comments. I never expected that the variable would end up being undefined after the loop. Just a last question before I consider making huge modifications to my code Is there a way to prematurely exit from a For loop? I know that Exit works to get out of a While loop. Does something analogous exist for a For loop. Thanks a lot to you guys. O.O.
  7. Hi, I am trying to get some old Top Speed Modula 2 Code to work. It had a lot of For-Loops where it used a global variable as the control variable. It also tried to assign the control variable inside the loop ? in order to make a quick exit out of the loop. For example it had something of the form: FOR i5:=0 TO Pbdim DO IF (Something here) THEN i5:= Pbdim; END; END I have declared a new local variable i5_extra, and a Boolean breakLoop locally. I have modified my loop as breakLoop:=FALSE; FOR i5_extra:=0 TO Pbdim DO IF breakLoop = FALSE THEN IF (Something here) THEN breakLoop:=TRUE; END; END; END; i5:=i5_extra; My program crashes at the last line i.e. i5:=i5_extra; Is it because the local variable somehow disappears?? I feel that it should be in scope as it is defined for the entire procedure. I get the error of the form: ?RTS Exception #3: invalid location? The above is an example ? my code is much longer than this. Thanks for your help. O.O.
  8. Thanks again sleepyhead. This did it for me. I went thorough all of my files replacing IO with IO_ and everything compiled. I now have to read your ReadMe file to see how to get this to further compile in C or C++. Perhaps I would do that over the weekend. Thanks again. O.O.
  9. Dear sleepyhead, I hate to be telling you this ? because actually in your very first post ? you had suggested that I do this. I had the module WINDOW in one of the Implementation Modules. This screwed things up Big Time. I can swear that I searched all of my modules ? but I don?t know how I did not catch this. I guess the first time I searched through the Windows Explorer telling it to search for the text in all of the files in the compilation directory ? this did not work, because it somehow recognizes the MOD files as some kind of movie files and considers them binary. I then searched using a text editor ? but then my import had ?Window? instead of WINDOW (which I copied from your post) ? and I missed it again. Yes, I do get the output on the screen ? but now my program crashes somewhere. I would have to spend time debugging it now. Thank you for your persistent help. O.O.
  10. Hi, I have a project that I have managed to compile using the XDS Native x86 Compiler (though it does not quite execute.) I then tried the C compiler without changing anything in the files, and it complains that it could not find ?IO.sym?. My errors look like * [parallel.mod 3.06 F425] * file open error: "IO.sym" no such file FROM $IO IMPORT WrStr; My command line looks like: xm =m -WOFF+ +STORAGE +topspeed +M2 +M2EXTENSIONS OMAIN.MOD I would be grateful if someone has some ideas on how to get rid of this error. Thanks a lot. O.O.
  11. Thanks sleepyhead for clarifying this, but then I don?t know what I might be doing wrong here?? O.O.
  12. Hi, I just wanted to add this ? if it would help. Though I have a number of modules, I have not specifically created a ?project? per se. I simply compile the Main Module with the other modules in the same folder ? and the XDS Compiler generates the object files for each of the other modules, and then the executable file for the Main Module. Is this the wrong way to do this?? I am compiling the main module with the following at the commandline: xc =m -WOFF+ +STORAGE +topspeed +m2addtypes +M2EXTENSIONS OMAIN.MOD where OMAIN.MOD is the name of my Main Module. Is this OK? O.O.
  13. Good Question snowman, I did not think of this. However, I did not expect some library modules to screw things up. Below I am trying to make a list of some of the Library Modules that my Modules in totality import: IMPORT Str; IMPORT IO; IMPORT BiosIO; FROM Lib IMPORT Exec, GetTime; FROM FIO IMPORT Open, File, Close, WrStr, WrLn, RdChar, RdStr,RdCard,WrCard, Create; FROM Storage IMPORT ALLOCATE,DEALLOCATE; I think this is all ? but there may be more. I am not sure if I missed any though. O.O.
  14. Dear sleepyhead, Actually none of my modules other than the Main Module have a body. Each of them define functions. So when they import each other ? as none of them have a body, nothing should be executed. Consequently, the program should not be affected. However for me the program does get affected. This is what puzzles me. As I mentioned in my post above, I stepped through it with the debugger ? and I could not find anyline getting executed other than the END statements in each of the remaining modules. O.O.
  15. Hi, In addition to my previous post above, I tried stepping through the program using the debugger. It seems that it first starts with the BEGIN statement in my Main Module. Then it executes the END statements in the ?Implementation Modules??? After it gets through all of the END statements in the ?Implementation Modules? it starts executing the real program i.e. to output a string to the console. So I am still clueless to what exactly gets executed in the ?Implementation Modules??? O.O.
×