Next

Prev

Prev-tail

Tail

Up

Chapter 31
Notations

This chapter introduces the various notations that are used in the document.

31.1 Words

31.2 Frames

31.2.1 Shell Sessions

Interactive sessions with a (Unix) shell are represented as follows.

 
$ echo toto 
toto  

The user entered ‘echo toto’, and the system answered ‘toto’. ‘$’ is the prompt: it starts the lines where the system invites the user to enter her commands.

31.2.2 urbiscript Sessions

Interactive sessions with Urbi are represented as follows.

 
echo("toto"); 
[00000001] *** toto  

Contrary to shell interaction (see Section 31.2.1), there is no prompt that marks the user-entered lines (here echo("toto");, but, on the contrary, answers from the Urbi server start with a label that includes a timestamp (here ‘00000001’), and possibly a channel name, ‘output’ in the following example.

 
cout << "toto"; 
[00000002:output] "toto"  

31.2.3 urbiscript Assertions

urbiscript features assertions blocks, see Section 20.9. The following assertion frame:

 
1 == 2 / 2; 
1 < 2; 
true; 
"foobar"[0, 3] == "foo"; 
[1, 2, 3].map (function (a) { a * a }) == [1, 4, 9]; 
[ => ].empty;  

actually denotes the following assertion-block in an urbiscript-session frame:

 
assert 
{ 
  true; 
  1 < 2; 
  1 + 2 * 3 == 7; 
  "foobar"[0, 3] == "foo"; 
  [1, 2, 3].map (function (a) { a * a }) == [1, 4, 9]; 
  [ => ].empty; 
};  

31.2.4 C ++ Code

C++ source code is presented in frames as follows.

 
class Int 
{ 
public: 
  Foo(int v = 0) 
    : val_(v) 
  {} 
 
  void operator(int v) 
  { 
    std::swap(v, val_); 
    return v; 
  } 
 
  int operator() const 
  { 
    return val_; 
  } 
 
private: 
  int val_; 
};