Forum Migration Notice
Update (2026-01-21): The user forums are now in read-only mode pending the data migration.

Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.

We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.

Load program module

I get the error "The source file to be loaded contains RAPID syntax errors" when trying to execute the following code:

The file "rit.prg" contains the code:
MODULE rit
PROC Main()
 LOAD Dynamic,"C:/folder/test.prg";
 %"test:callme"%;
 UNLOAD "C:/folder/test.prg";
ENDPROC
ENDMODULE

The file "test.prg" contains the code:
MODULE test
PROC callme()
 TPWrite "Hello";
ENDPROC
ENDMODULE

The two files are in the same directory.

Does anyone have an idea of what's wrong?

Comments

  • "test" is a reserved keyword in RAPID, which makes it an illegal module name (not the file name).

    Try changing the line: "MODULE test" to "MODULE test1" or to some other name and try it again.

    Also, you must fix your late-binding call, i.e. %"test1:callme"%;

    RussD2007-3-20 22:53:32
    Russell Drown
  • That must me it! I'm kind of embarrassed that I didn't think of that. I will test this the first thing tomorrow morning. Thanks.