Ultimate Amiga

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Compiling program that has included files..  (Read 105 times)

silverman71

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
  • Happy Amiga user
Compiling program that has included files..
« on: November 06, 2019, 08:01:32 AM »

Hi!

I'm writing a utility-program in AMOS and since it's gotten quite large I'm using include-statements in the beginning of the program. However when I try to compile that program the compiler hangs telling me there is an error at line 18 :(

Has anyone sucessfully compiled an AMOS Pro program that has includes?
Logged
Assumption is the mother of all fuck-ups!

adrazar

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 55
  • Generic Amiga User
Re: Compiling program that has included files..
« Reply #1 on: November 06, 2019, 11:46:31 PM »

Good time to ask this question, because I'm also having a go at using the Include instruction these days ;). Before I did anything substantial with it I made sure the compiler could compile a simple program containing an include statement, and that worked all right. When I tried the compiler again now, this time with the actual application I'm working on, the result was not successful.. I made some experiments to see what the problem could be; apparently one thing the compiler can't handle is assigning values from the main program to included Global variables.

Well, looking over my initial test once more it seems even the simple test program crashes when running the compiled version, although the compiler didn't complain. So I guess the conclusion must be that the compiler, in its current state, doesn't support Include statements at all.. :/ I can get around this problem in my current project by using copy/paste when the program is done, because I don't need the compiler for performance testing or similar during development. Maybe that could work for you too?

Personally what's bothered me most about Include (during my 2-3 weeks of experience, that is) is that closing procedures with F9 doesn't work properly with it.. :S (All code beneath the Procedure statement (also that not belonging to the procedure) sometimes get closed within the procedure. Running (and especially saving) a program in such a state is not particularly recommended).
Logged

silverman71

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
  • Happy Amiga user
Re: Compiling program that has included files..
« Reply #2 on: November 07, 2019, 06:17:16 AM »

You seem to have the exact same experience with the include as I do.

I was thinking about moving all the globals into the main program but with your experience that doesn't seem to help either. I really don't need to compile the program for performance reasons but it's nice to have it on the ButtonMenu ;)

I ended up doing the same as you, copy and paste everything into the main program and then it worked fine with the compiler.

It probably never worked properly, otherwise larger demos on the disks or the utility-programs would have had includes themselves.

Amos has it perks and it's setbacks now and then ;)
Logged
Assumption is the mother of all fuck-ups!
Pages: [1]   Go Up
 

TinyPortal 1.6.4 © 2005-2019