Closed SethMarshall closed 2 years ago
Thanks. There is not much documentation yet because the project is evolving and there is a rather high degree of volatility in everything (though I always keep backwards compatibility in mind).
My Oberon compiler and IDE support most of the Oakwood guidelines (see e.g. http://www.edm2.com/index.php/The_Oakwood_Guidelines_for_Oberon-2_Compiler_Developers). The modules described in the guidelines can be enabled by checking "Built-in Oakwood" in the Project menu of the IDE, or by the "-oak" option in the command line version of the compiler (OBXMC).
read user input from the console.
Use the procedures in the In module.
equivalent of println
Use the Out module
how exactly do you import "framework" libraries
In the current incarnation of the IDE you would just add them to the project. There is even a way to group related modules using the concept of "import paths" (see https://github.com/oberon-lang/specification/blob/master/The_Programming_Language_Oberon%2B.adoc#11-modules). An example how this works is here: https://github.com/rochus-keller/Oberon/tree/master/testcases/Are-we-fast-yet (see the "som" modules).
Don't worry to ask if something is unclear.
I see. Didn't realize modules had to be manually added. As a test, I added. the SDL.obx module to my project, now the following code compiles and runs:
**module Test import SDL
begin
println('Hello World')
end Test**
I'm unable, however, to find In.Obx or Out.Obx anywhere in the unzipped OberonIDE_win32 folder. Am I looking in the wrong place, or are they part of a differently named module?
Thanks again for making this language/IDE available to the public.
I'm unable, however, to find In.Obx or Out.Obx
It's compiled in the executable. Here are the definition modules: https://github.com/rochus-keller/Oberon/tree/master/oakwood. The implementation is either in C# (for the Mono engine) or in C (for the C export), see https://github.com/rochus-keller/Oberon/tree/master/runtime.
The simplest solution seems to be checking the "Built-in Oakwood" box which I hadn't noticed before (Learning from scratch as I go).
I can now compile and run a program that prompts the user for console input. Only catch now is that the Output window itself doesn't appear to allow for input, so the program just hangs forever. Is there a way to enable console input in the IDE?
You can either generate C and do it there or use the present work-around which allows you to put the console input to a file and reference this file using the "Set Input File" item from the "Build&Run" menu. Some day I will have to provide a better solution (e.g. like opening a terminal window).
This is quite an impressive project. I've only skimmed the documentation since it is not a tutorial, but I'm having a hard time figuring out how to read user input from the console.
When I try to import the In module I get a compilation error. Is there a read equivalent of println?
In general how exactly do you import "framework" libraries? (Apologies if I missed these instructions elsewhere)