Wsh Tutorial: Operator Chain

  • syntax: op
  • description: op
  • beispiel: {RZ4+dsn.beispiel.wsh(wshTut40)}

operator allow casting of datatype e.g. of String dsn to a file accessing this dsn. Or from a block, to a String of its concatenated outputs.

To make Live easier, a lot of default kinds and operators are applied - to change the default behavior, you sometimes need more Operators or Kinds then you would expect. E.g. a block can only be preceeded by operators, if it is preceeded by a kind, because wsh assumes default kind and operators, sometimes several copies of the same operator character are needed

$#@
$$ --- operator .-<@|?%^  ---
$$ . 2object $..-'eins' $..@=¢zwei$!
$= v3 =.-= drei
$$ - 2string $-v3 $.v3 $--..v3  $-=¢vier
   fuenf$!
$$- '< 2file' className(objClass($.<-=¢~wk.rexx(wsh)$!))
$=r=.@-¢fuenf time()$!
$$- '@ 2run ' className(objClass($r)) 'run='$-%r
$<> $<.<#¢ginge auch mit $<=¢
sechs
$!
call pipeWriteAll
$<>
$$ | singleton $-|=¢sieben $!
$$ ? 0or1      $-?=¢acht   $!
$$ % runOut    $-%p1
$$ ^ runRet    $-^p1
$proc p1 $@¢$$ p1 output $@ return 'p1 returns'$!
$<>
$#out                                              20161127 14:33:32
--- operator .-<@|?%^  ---
. 2object !eins O.176.1
- 2string !drei !drei drei  vier    fuenf
< 2file File
@ 2run  ORun178 run=FUENF 14:33:32
ginge auch mit $<=¢
sechs
| singleton sieben
? 0or1      acht
% runOut    p1 output
p1 output
^ runRet    p1 returns
$

character set problems

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