Dear All, From Project Oberon Book, 2.2.2. Commands This tremendous flexibility seems to open Pandora's box, and indeed it does when misused. The reason is that global variables' states may completely determine and alter the effect of a command. The variables represent hidden states, hidden in the sense that the user is in general unaware of them and has no easy way to determine their value. The positive aspect of using global variables as interfaces between commands is that some of them may well be visible on the display. All viewers - and with them also their contents - are organized in a data structure that is rooted in a global variable (in module Viewers). Parts of this variable therefore constitute visible states, and it is highly appropriate to refer to them as command parameters. This is good, I am able to understand it. One of the rules of what may be called the Oberon Programming Style is therefore to avoid hidden states, and to reduce the introduction of global variables. We do not, however, raise this rule to the rank of a dogma. There exist genuinely useful exceptions, even if the variables have no visible parts. As I understood, we are using global variables, but these have visible states. So better for using them as parameters to user commands. There remains the question of how to denote visible objects as command parameters. An obvious case is the use of the most recent selection as parameter. A procedure for locating that selection is provided by module Oberon. (It is restricted to text selections). Another possibility is the use of the caret position in a text. This is used in the case of inserting new text; the pressing of a key on the keyboard is also considered to be a command, and it causes the character's insertion at the caret position. This says, caret position (which is seen on screen texts after pressing left mouse key) can be interpreted as starting of a parameter list. Also the text under selection (which we are able to make using right mouse button on screen texts) can be interpreted as starting of a parameter list. A special facility is introduced for designating viewers as operands: the star marker. It is placed at the cursor position when the keyboard's mark key (SETUP) is pressed. The procedure Oberon.MarkedViewer identifies the viewer in whose area the star lies. Commands which take it as their parameter are typically followed by an asterisk in the text. Whether the text contained in a text viewer, or a graph contained in a graphic viewer, or any other part of the marked viewer is taken as the actual parameter depends on how the command procedure is programmed. Huh, here I couldn't understand, what is a marked viewer. Which one is the equivalent of "keyboard's mark key" in IBM 102 style keyboard? How a graph be input to some command? I am not able to understand this paragraph! With thanks and best regards, Yours sincerely, Srinivas Nayak Home: http://www.mathmeth.com/sn/ Blog: http://srinivas-nayak.blogspot.in/
On Sun, Dec 23, 2012 at 1:02 PM, Srinivas Nayak <sinu.nayak2001@gmail.com>wrote:
Dear All,
From Project Oberon Book,
A special facility is introduced for designating viewers as operands: the star marker. It is placed at the cursor position when the keyboard's mark key (SETUP) is pressed. The procedure Oberon.MarkedViewer identifies the viewer in whose area the star lies. Commands which take it as their parameter are typically followed by an asterisk in the text. Whether the text contained in a text viewer, or a graph contained in a graphic viewer, or any other part of the marked viewer is taken as the actual parameter depends on how the command procedure is programmed.
Huh, here I couldn't understand, what is a marked viewer. Which one is the equivalent of "keyboard's mark key" in IBM 102 style keyboard? How a graph be input to some command? I am not able to understand this paragraph!
When you type the F1 key, a large marker appears where the mouse cursor is. It looks like the * or a snowflake.
With thanks and best regards,
Yours sincerely, Srinivas Nayak
Home: http://www.mathmeth.com/sn/ Blog: http://srinivas-nayak.blogspot.in/
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
-- Aubrey McIntosh, Ph.D. 211 E. 5th St. Morris MN 56267 (512)-348-7401
From: Srinivas Nayak [mailto:sinu.nayak2001@gmail.com]
Dear All,
From Project Oberon Book, [...] A special facility is introduced for designating viewers as operands: the star marker. It is placed at the cursor position when the keyboard's mark key (SETUP) is pressed. The procedure Oberon.MarkedViewer identifies the viewer in whose area the star lies. Commands which take it as their parameter are typically followed by an asterisk in the text. Whether the text contained in a text viewer, or a graph contained in a graphic viewer, or any other part of the marked viewer is taken as the actual parameter depends on how the command procedure is programmed.
Huh, here I couldn't understand, what is a marked viewer. Which one is the equivalent of "keyboard's mark key" in IBM 102 style keyboard?
F1 normally.
How a graph be input to some command? I am not able to understand this paragraph!
This is one of the things that makes Oberon so interesting. When you understand the principles of the system the question turns itself upside down and you ask "Why shouldn't a graph be input to some command?". As Wirth says in your quote, 'whether the text [...] is taken as the actual parameter depends on how the command procedure is programmed". If you have selected a graph then you can call its procedures, or send it messages if you want to be object-oriented about it. B
participants (3)
-
Aubrey.McIntosh@Alumni.UTexas.Net -
Bob Walkden -
Srinivas Nayak