As much as I think `cm3ide' is very cool, I'm too used to
working with `emacs'. I'd like to establish an emacs-centric
workflow for using cm3 - if that's possible. Advise please.
In the meantime, I have the following code in a M3 "learning"
directory:
MODULE Main;
IMPORT IO;
VAR name: TEXT;
BEGIN
IO.Put("Enter your name: ");
name := IO.GetLine();
IO.Put("Your name is: " & name & "\n");
END Main.
The c3makefile is:
import("libm3")
implementation("Main")
program("my_hello")
It compiles, but with this warning:
dnormandin@select-man:~/Programming/Modula-3/code$
cm3
--- building in LINUXLIBC6 ---
new source -> compiling Main.m3
"../Main.m3", line 8: warning: potentially unhandled exception: IO.Error
1 warning encountered
-> linking my_hello
I like to clean up all warnings - so what did I do wrong in the above
code or makefile? TIA
--
Duke
Interestingly in Acorn/olivetti did an experiment with an Modula-2+
written OS, they changed the exceptions policy "rule" twicking the
compiler and found several places where there were undeclared
exceptions, for such an OS it was even wrote ina research report.
Interestingly deeper in the comp.lang lists (found Modula-2 RT and
tool chain for Modula-2+) more information come to my light:
Try to check this featured Hello world, sort of nice, and hope helps
you understand the message a bit more:
http://www.ucam.org/chat/FAQ.0.3.html
Thanks in advance
PS: may more data become on the time as they recorded everything of
meeting sessions on Modula-3 design, just that by human error erased!
but some bits are in the SPWM3 alst chapter 7. May be that more become
available if such over time to come.
I'm slowly getting the picture about how Modula-3 operates ...
> Interestingly in Acorn/olivetti did an experiment with an Modula-2+
> written OS, they changed the exceptions policy "rule" twicking the
> compiler and found several places where there were undeclared
> exceptions, for such an OS it was even wrote ina research report.
>
> Interestingly deeper in the comp.lang lists (found Modula-2 RT and
> tool chain for Modula-2+) more information come to my light:
> Try to check this featured Hello world, sort of nice, and hope helps
> you understand the message a bit more:http://www.ucam.org/chat/FAQ.0.3.html
Holy cow! what a difference between C and M3!
So ... the bottom line is what? That I failed to test for some
"xception" - some "corner case"?
MODULE Main;
IMPORT IO;
VAR name: TEXT;
BEGIN
IO.Put("Enter your name: ");
TRY
name := IO.GetLine();
IO.Put("Your name is: " & name & "\n");
EXCEPT
IO.Error =>
IO.Put ("Sorry illegal end of line");
END
END Main.
So more or less the same, but not the same for example Rd/Wr
interfaces, that is a really good designed package, you can read it
about in SPWM3 in chapter 6. Most of it is written in safe grounds and
some UNSAFE, still most of the common errors are detected if so by RT.
Very interesting, even they got to catch some RT errors there using
Extended Static Checking (as uncaught exception,a s a warning at ESC
time).
Thanks in advance
It's a framework with rwe, see:
http://www.se.rwth-aachen.de/tikiwiki/tiki-download_file.php%3FfileId=275
, and see:
http://www.se.rwth-aachen.de/tikiwiki/tiki-download_file.php%3FfileId=273
built with Progres, XML and connecting with Emacs and another program,
see:
http://www.se.rwth-aachen.de/tikiwiki/tiki-index.php%3Fpage_ref_id=219.html
It is to be free software, in their terms, actually there was a
[1] F. Gatzemeier, CHASID: A Semantics-Oriented Authoring Environment,
1st ed. Shaker Verlag GmbH, Germany, 2005.
There is an small IDE actually for your purposes written by Michael
Daganais:
http://www.professeurs.polymtl.ca/michel.dagenais/pkg/m3ide.tgz
And there was a macro to convert lower to upper case keywords (I don't
have a copy, if some body maybe have one, called m3su):
http://www.faqs.org/faqs/Modula-3-faq/
There is actually another one (a developer called Martin Bishop, may
give you a hint hopefully martinbishop at bellsouth.com is his email
address).
Ok, hope it helps, thanks in advance
Much obliged!
--
Duke
Thanks! You should not have gone to so much trouble, as I'm not sure if I will even stay with Modula-3. The Oxford Oberon-2 compiler is looking simpler to use and just as effective. We'll see. Again, very much obliged!
--
Duke