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

Daniel Alejandro Benavides D. dabenavidesd at yahoo.es
Sun Jan 6 02:26:48 CET 2008


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.

Thanks for the great work you have done to keep this wonderful enviroment going on in so many platforms.

Happy new years modula-3 developers !!

Daniel Benavides




       
---------------------------------

Web Revelación Yahoo! 2007:
 Premio Favorita del Público - ¡Vota tu preferida!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20080106/f36b18ab/attachment-0001.html>


More information about the M3devel mailing list