stand alone oberon application 
Author Message
 stand alone oberon application

Hi,

is there an easy way to run an Oberon application
on its own. Just reading something from stdin
writing something on stdout without this silly
window-schnickschnack.

Thanx in advance                stefan



Sat, 10 Aug 1996 18:58:59 GMT  
 stand alone oberon application

: is there an easy way to run an Oberon application
: on its own. Just reading something from stdin
: writing something on stdout without this silly
: window-schnickschnack.

The extensible user-interface is part and parcel of
the oberon distribution from the ETH. It is the
recommended way of using the system. Many programmers
new to the oberon system try to avoid it because they
dislike the look and feel and because they would rather use
their own tried an true technique of programming. This
is mistake. The Oberon system offers a lot of support for
managing its system of dynamic loaded modules, garbage collector
etc directly from the interface. It would take a lot of
work to replace this interface with another design and is best
down when one is familiar with the Oberon programming technique.

On the other hand, if you already knew this and had carefully
choosen to go another route then it is worth noting that
on most of the oberon implementations you can use
start oberon with
        oberon -execute MyModule.main
which executes the procedure "main" in MyModule in place
of the default Oberon.Loop normally used to load and control
the event loop of the user interface. The module Clib ( or similar )
gives you access to the low-level standard C library functions and
consequently DOS/Windows/Unix environment variables upon which
you can build your code.

If you love the language but dislike this programming approach
you should consider the commerical implementations of native
Oberon compilers and Oberon to C compiler/translators. A list
of commerical suppliers can be found in the FAQ on rtfm.mit.edu.

Whitney



Sun, 11 Aug 1996 21:34:15 GMT  
 stand alone oberon application

Quote:
> On the other hand, if you already knew this and had carefully
> choosen to go another route then it is worth noting that
> on most of the oberon implementations you can use
> start oberon with
>    oberon -execute MyModule.main

...using SPARC oberon...

I want to have my students e-mail their lab data to me.  Thereupon,
I want to have an Oberon program process it, doing various things
such as add their data to the class database, mail a receipt, and
give grade hints to me.  One design choice is either to have this
run as a background task when I'm running Oberon, to have it
activated by mail and appropriate magic in a .forward file, or to
have it always running as a background job on a public workstation
without the standard interface.

I'd like to see a program example, Example.Mod, that copies stdin to
stdout.  Then I could have an appropriate .forward file that says
something like "| oberon -x  Example Copy"

I have absolutely no idea how to do this in C, so the Unix.Def will
be an expensive utility to me.

Does anyone have this example?

--
Aubrey McIntosh  /  Chemistry  /  University of Texas  /  Austin, TX 78712
Tuesday at 6 am I let one of the cats out.  It was 65 degrees and humid.
At 6:30 I let the other cat out.  It was 35 degrees and sleeting.  We call
this a blue norther.



Mon, 12 Aug 1996 05:25:22 GMT  
 stand alone oberon application


I'm glad someone is torturing beets! Ptooie.

Quote:
>I want to have my students e-mail their lab data to me.  Thereupon,
>I want to have an Oberon program process it, doing various things
>such as add their data to the class database, mail a receipt, and
>give grade hints to me.  One design choice is either to have this
>run as a background task when I'm running Oberon, to have it
>activated by mail and appropriate magic in a .forward file, or to
>have it always running as a background job on a public workstation
>without the standard interface.

>I'd like to see a program example, Example.Mod, that copies stdin to
>stdout.  Then I could have an appropriate .forward file that says
>something like "| oberon -x  Example Copy"

>I have absolutely no idea how to do this in C, so the Unix.Def will
>be an expensive utility to me.

>Does anyone have this example?

Are you looking for a C program to copy stdin to stdout?  Of course, you
could use 'cat' to do that, but I could whip something up if you wanted
source.

If you are asking Oberon to do it, I am not exactly sure what you mean (I
don't have access to a real network or OS with Oberon....).

Taylor "The New Number One" Hutt
I am not a prisoner, I'm a free man!



Mon, 12 Aug 1996 09:22:28 GMT  
 stand alone oberon application


: > On the other hand, if you already knew this and had carefully
: > choosen to go another route then it is worth noting that
: > on most of the oberon implementations you can use
: > start oberon with
: >  oberon -execute MyModule.main

: ...using SPARC oberon...

: I'd like to see a program example, Example.Mod, that copies stdin to
: stdout.

Here is a buffered copy of stdin to stdout using the unix
file descriptors 0 and 1. The file descriptors 0,1 and 2
are properties of the unix process and do need to be opened
or closed by a programmer. ( N.B. I have not tested or compiled
the following code, but it should work )

MODULE Example;
IMPORT S := SYSTEM,
        Unix; (* or something similar *)

CONST
        Stdin = 0;
        Stdout = 1;
        BUFSIZE = 512;

PROCEDURE main*;
VAR dummy, n : LONGINT; buf : ARRAY 512 OF CHAR;
BEGIN
        n := Unix.read( StdIn, S.ADR( buf ), BUFSIZE );
        WHILE n > 0 DO (* n = 0 when all chars have been read *)
                dummy := Unix.write( StdOut, S.ADR( buf ), n );
                n := Unix.read( StdIn, S.ADR( buf ), BUFSIZE );
        END;
END main;

END Example.

Whitney



Mon, 12 Aug 1996 10:04:23 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Creating Stand Alone Applications With Oberon-2

2. To stand-alone or not to stand-alone

3. Installing Stand Alone Oberon from second floppy

4. Stand-alone Oberon for Intel

5. How Do You Create Stand Alone Applications?

6. Stand alone application with VISA

7. Finding Other LabView Stand-Alone Applications On Same Computer

8. immediate execution of stand-alone application

9. immediate execution of stand-alone application

10. SCM stand-alone application?

11. stand alone applications

12. newbie: Using shout3d in java stand-alone-application

 

 
Powered by phpBB® Forum Software