Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Oberon > sample stack pr...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 431 of 481
Post > Topic >>

sample stack programm

by schrei <schrei@[EMAIL PROTECTED] > Jul 25, 2007 at 10:16 PM

Hallo!

I?m trying to translate a borland pascal sample program to gpcp.
The lines "Sys.Console.WriteLine(myEnumerator.Current);" and
"Sys.Console.WriteLine(myStack.Count);" does not compile. Why does it 
not compile?
The delphi sample programm is here 
http://delphi.about.com/library/fcl/system/collections/blfclstack.htm

Kind regards
Helmut

MODULE SamplesStack;
IM****T Col := mscorlib_System_Collections, Sys := mscorlib_System, CPmain;

VAR myStack : Col.Stack;

PROCEDURE PrintValues(myCollection: Col.IEnumerable);
VAR myEnumerator: Col.IEnumerator;
BEGIN
   myEnumerator := myCollection.GetEnumerator;
   WHILE myEnumerator.MoveNext DO
     Sys.Console.WriteLine(myEnumerator.Current);
   END;
   Sys.Console.WriteLine;
END PrintValues;

BEGIN
   NEW(myStack );
   myStack .Push("Hallo");
   Sys.Console.WriteLine(myStack);
   Sys.Console.WriteLine(myStack.Count);
   PrintValues(myStack);
END SamplesStack.
 




 3 Posts in Topic:
sample stack programm
schrei <schrei@[EMAIL   2007-07-25 22:16:58 
Re: sample stack programm
Pascal Bourguignon <pj  2007-07-25 22:27:49 
Re: sample stack programm
"Chris Burrows"  2007-07-26 10:02:15 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 5:42:49 CDT 2008.