Wsh Tutorial: Operators Block Primary Expression

  • syntax: oPrBlEx
  • beispiel: {RZ4+dsn.beispiel.wsh(wshTut34)}

Many statements allow oPrBlEx. This is a flexible construct allowing after optional leading operators

  • primary
  • block
  • expression (until the end of line or the next $-wshStatememt)

Primary is not allowed for all kinds (e.g. =). If primary and expressions are allowed, wsh interprets $@abc as a primary (variable abc), but $@ abc as an expression, thus, carefully look for a leading space!

$#@
$$ --- operators* (block or primary or expression) ---
$=n1=eins
$$-n1
$$.f1
$$^f1
$$¢block
    $$zwei$!
$$^ f1 mit arg
$$n1=$n1
$$- '- n1='$n1
$@¢ call out '@ run: 1. run block with kind @' $!
$$ 2. run object, e.g. proc
$@p2
$@% p2 3. run proc p2 with args - expression not primary|
$proc $@/f1/ $arg aa $@ return 'return f1('$aa')' $/f1/
$proc $@/p2/ $arg aa $$ start p2($aa) $/p2/
$#out                                              20161127 10:23:40
--- operators* (block or primary or expression) ---
eins
O.176.1=¢ORun176!
return f1()
block zwei
return f1(mit arg)
n1=eins
- n1=eins
@ run: 1. run block with kind @
2. run object, e.g. proc
start p2()
start p2(3. run proc p2 with args - expression not primary|)
$#out                                              20161126 14:47:10
--- operators* (block or primary or expression) and run ---
eins
O.176.1=¢ORun176!
return f1()
block zwei
return f1(mit arg)
n1=eins
- n1=eins
@ run: 1. run block with kind @
2. run object, e.g. proc
start p2()
start p2(3. run proc p2 with args - expression not primary|)

character set problems

wikiz/osname
¢![]square brackets
|!exclamation mark