[M3devel] Problem with an exmaple of Modula-3 tutorial

Olaf Wagner wagner at elegosoft.com
Sun Jan 6 13:01:46 CET 2008


Quoting "Daniel Alejandro Benavides D." <dabenavidesd at yahoo.es>:

> Hi all:
> I was showing an example to a friend of the Modula-3 tutorial, but   
> we ran into an error with the first one:
>
> http://modula3.elegosoft.com/cm3/doc/tutorial/m3/m3_2.html#SEC2
>
>
> MODULE Main ;
>
> IMPORT IO;       (* So we can print things *)
>
> VAR name: TEXT;  (* a string variable called "name" *)
>
> BEGIN
>   IO.Put("Enter your name: ");
>   IO.GetLine(name);
>   IO.Put("Your name is: " & name & "\n");
> END Main.
>
> "../src/Main.m3", line 9: incompatible types (rd)
>
> Well fortunately we have this great documentation of the interfaces,
> so a correct (not formally proved) code is:
>
> MODULE Main;
>
> IMPORT IO;       (* So we can print things *)
>
> VAR name: TEXT;  (* a string variable called "name" *)
>
> BEGIN
>   IO.Put("Enter your name: ");
>   name:=IO.GetLine();
>   IO.Put("Your name is: " & name & "\n");
> END Main.
>
> I have a cvs account, I cancheck it also for prepare my knowledge   
> and merge some modifications of m3-lectern packages to be able to   
> compile them.

Please check in any corrections you'd care to do and let m3-support
know about when to ship updates to the web server.

Olaf
-- 
Olaf Wagner -- elego Software Solutions GmbH
                Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95
    http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194




More information about the M3devel mailing list