Revision 86

This is my regression reference for older stuff in revision and new stuff in experimentation aligned to upload version number. As I work on new features and correct problems with old ones, I collect my test cases here. They become part of my regression testing as well as notes of documentation I must complete.

Commentary Code Result
Commentary 'A'10 %% 3 %**$; Seq[R1C3:K]
[1]String[R2C1:C]A
[2]Num[R1C1:I]10
[3]String[R2C1:C]A
Commentary 'A'10> %% 3 %**$; Seq[R1C3:K]
[1]Seq[R3C2:K]
*[1]String[R1C1:C]A
*[2]Num[R1C1:I]10
[2]Seq[R3C2:K]
*[1]String[R1C1:C]A
*[2]Num[R1C1:I]10
[3]Seq[R3C2:K]
*[1]String[R1C1:C]A
*[2]Num[R1C1:I]10
Commentary 'a'#pgm{
  'a-Start'$;
  'b'#pgm{
    'b-Start'$;
    :?(x* =_1){'b-Return' :->}
    'b-End'
    };
  b$;
  'a-End'$;
  };
'1st Call (w/o Arg):'$;     a;
'2nd Call (w Arg):'$;  1[.x]a;
'3rd Call (w/o Arg):'$;     a
1st Call (w/o Arg):
a-Start
b-Start
b-Return
a-End
2nd Call (w Arg):
a-Start
b-Start
b-End
a-End
3rd Call (w/o Arg):
a-Start
b-Start
b-End
a-End
Commentary $$ == run vvv ============================
'run'#pgm{
$$ -- Initialization ---------------------
#ix{
  'HW'#pgm{'Hello World'};
  'GB'#pgm{'Good Bye'};
  'NC'#pgm{'No Comprende'};
  'Initialized' :->;};

$$ -- program body -----------------------
@ ~(@ ~ (.HW.GB.NC)) => @; $$ clean up namespace
#args;                     $$ fresh arguments
:?(x='hello'){HW}::?(x='bye'){GB}::{NC}}; $$ work
$$ == run ^^^ ============================

'<1>'(run)$;
'<2>'(run) $;
'<3>'('hello'[.x]run)$;
'<4>'('adios'[.x]run)$;
'<5>'('bye'  [.x]run)$;
<1>Initialized
<2>No Comprende
<3>Hello World
<4>No Comprende
<5>Good Bye
Commentary #ns => @;
'<1>'(a+1)$;
'<2>'(a*1)$;
'<3>'(a-1)$;
'<4>'(a/3)$;
'<5>'(:@&(1..3){cnt+1=>cnt}%*2)$;
'<6>'(:@&(1..3){pwr*2=>pwr}%*2)$;

<1>1
<2>1
<3>_1
<4>0.333333
<5> 1 2 3
<6> 2 4 8
Commentary 'factorial'#op{
  :?(l__<=1){:->};
  l__*(l__-1 factorial)};
5 factorial$;
120
Commentary 'factorial'#pgm{
  :?(x<=1){:->};
  x*(x-1[.x]factorial)};
5[.x]factorial$;
120