Let's imagine a scenario:
File library1.corth:
include "linux_x86/stdio.corth"
proc hello-world -> in
"Hello, world!\n" puts
end
File library2.corth:
File main.corth:
include "library2.corth"
proc main int int -> int in
hello-world
end 0 end
In this program, main.corth is trying to call the hello-world procedure which is inside library1.corth. Compiler allows this behavior because library2.corth includes library1.corth. C/C++ compiler also allows this. However this is an unwanted "feature", because in Corth, every source file should include the source files that it needs and only the source files that it needs. So the compiler should to complain, or at least create a warning about this situation.
Let's imagine a scenario:
File library1.corth:
File library2.corth:
File main.corth:
In this program, main.corth is trying to call the
hello-worldprocedure which is inside library1.corth. Compiler allows this behavior because library2.corth includes library1.corth. C/C++ compiler also allows this. However this is an unwanted "feature", because in Corth, every source file should include the source files that it needs and only the source files that it needs. So the compiler should to complain, or at least create a warning about this situation.