[Oberon] Calling a command from within a normal procedure
Chris Burrows
chris at cfbsoftware.com
Mon Mar 7 13:25:30 CET 2016
> -----Original Message-----
> From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of
> Srinivas Nayak
> Sent: Monday, 7 March 2016 10:29 PM
> To: ETH Oberon and related systems
> Subject: Re: [Oberon] Calling a command from within a normal
> procedure
>
> I mean calling Edit.Open as we call String.Ln in a procedure.
> To my knowledge, an exported parameter-less procedure can be a
> command.
> Then what is the difference between Edit.Open and String.Ln?
>
(I attempted to send this clarification to my previous reply, earlier -
apologies if I'm repeating myself)
No difference in the way they are called. However, some commands expect
interactive input (e.g. via a Texts.Scanner). Here's a simple test program
that illustrates calling a parameterless exported procedure (Edit.Open) from
another procedure:
MODULE Command;
IMPORT Edit;
PROCEDURE Run*;
BEGIN
Edit.Open
END Run;
END Command.
Regards,
Chris
More information about the Oberon
mailing list