[Oberon] How to write this program in Oberon-07?

Ivan Denisov d.ivan.krsk at gmail.com
Fri Jan 28 09:43:51 CET 2022


If you will have questions about BlackBox, you are welcome to this board

https://community.blackboxframework.org/

we also did chat recently

https://matrix.to/#/#blackbox:matrix.org

It is more easy to share questions and screenshot sometimes in chat format.


Best regards,

Ivan Denisov


25.01.2022 21:52, Ala'a Mohammad пишет:
> Hi,
>
> I do not want to start multiple rabbit holes. But here I go. There is 
> another version of BlackBox which is based on the 'Base' from the link 
> given. Its url is https://blackbox.oberon.org/. I did not dig 
> deeper, since I already have invested time in other one, but it is on 
> my 'explore' list.
> One clear distinction is the multiple documents as multiple windows 
> (in contrast to the BlackBox at https://blackboxframework.org/ , which 
> has the multiple documents inside one Window).
>
> HiH and Have fun.
>
> Regards,
>
> On Tue, Jan 25, 2022 at 12:14 PM Joe Turner <medianjoe at mailfence.com> 
> wrote:
>
>     Hi Pablo,
>     Many thanks for the links. I wasn't aware of Blackbox or component
>     Pascal. I use Linux but it seems to work flawlessly with Wine. The
>     book looks really good too.
>     Joe
>
>     January 24, 2022 8:19:02 PM CET Pablo Cayuela
>     <pablo.cayuela at gmail.com> wrote:
>>
>>
>>     On Mon, Jan 24, 2022 at 11:14 AM Joe Turner
>>     <medianjoe at mailfence.com> wrote:
>>     >
>>     > I'm working through the book "Into the Realm of Oberon" which
>>     is written for Oberon-2. I can't figure out how to translate the
>>     following program into Oberon-07 (I'm using the OBNC compiler):
>>     >
>>     > MODULE case;
>>     > IMPORT In,Out;
>>     >
>>     > VAR countVowels: INTEGER; ch: CHAR;
>>     >
>>     > BEGIN
>>     >   In.Open;
>>     >   countVowels:=0;
>>     >   LOOP
>>     >     In.Char(ch);
>>     >     IF ~In.Done THEN EXIT END;
>>     >     CASE ch OF
>>     >       "a", "e", "i", "o", "u",
>>     >       "A", "E","I","O","U": INC(countVowels)
>>     >     ELSE
>>     >     END;
>>     >   END;
>>     >   Out.Int(countVowels,0);
>>     >   Out.String(" vowels read.");Out.Ln;
>>     > END case.
>>     >
>>     > Oberon-07 doesn't allow LOOP, EXIT, or ELSE in CASE.
>>     > Thanks in advance for any help.
>>     >
>>
>>     Hi Joe,
>>     One way for you to use Oberon-2 syntax is to employ BlackBox
>>     Component Pascal Environment:
>>     https://blackboxframework.org/index.php?cID=home,en-us
>>     One public domain good book for practicing with BB CP is this:
>>     https://cslab.pepperdine.edu/warford/ComputingFundamentals/
>>     And its resources:
>>     http://www.zinnamturm.eu/downloadsOS.htm#Pbox
>>
>>     Another way to use Oberon-2 syntax is to employ Oberon System 3
>>     with Gadgets under Windows or Linux:
>>     https://github.com/pcayuela/oldftpETHZOberon/tree/master/System3/Win95NT
>>     https://github.com/pcayuela/oldftpETHZOberon/tree/master/System3/Unix
>>
>>     In BlackBox your program counts the vowels on the viewer from
>>     where it is called.
>>     In Oberon System 3, it counts the vowels after the command line
>>     in any viewer.
>>     I've only modified your program puting the executable part inside
>>     a procedure to call it from any viewer inside of Oberon System 3
>>     or BlackBox CP:
>>
>>     MODULE Case;
>>     IMPORT In,Out;
>>
>>     VAR countVowels: INTEGER; ch: CHAR;
>>
>>     PROCEDURE Vowcount *;
>>     BEGIN
>>       In.Open;
>>       countVowels:=0;
>>       LOOP
>>         In.Char(ch);
>>         IF ~In.Done THEN EXIT END;
>>         CASE ch OF
>>           "a", "e", "i", "o", "u",
>>           "A", "E","I","O","U": INC(countVowels)
>>         ELSE
>>         END;
>>       END;
>>       Out.Int(countVowels,0);
>>       Out.String(" vowels read.");Out.Ln;
>>     END Vowcount;
>>     END Case.
>>
>>     Best regards,
>>     Prof Pablo Cayuela
>>     Argentina
>>
>>     --
>>     Oberon at lists.inf.ethz.ch  mailing list for ETH Oberon and related systems
>>     https://lists.inf.ethz.ch/mailman/listinfo/oberon
>     -- Sent with https://mailfence.com Secure and private email --
>     Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related
>     systems
>     https://lists.inf.ethz.ch/mailman/listinfo/oberon
>
>
> --
> Oberon at lists.inf.ethz.ch  mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20220128/fe776e07/attachment.html>


More information about the Oberon mailing list