Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
|||
fcn longer(a,b){ //-->0,1,2 (same, a longer, b longer)
|
||||
while(a and b){a=a.del(0); b=b.del(0);}
|
||||
if (not a and not b) return(0); // a & b same length
|
||||
if(a) return(1); // a is longer
|
||||
2 // b is longer
|
||||
}
|
||||
|
||||
text:=a:=ask("text: ").strip();
|
||||
while(b:=ask("text: ").strip()){
|
||||
switch(longer(a,b)){
|
||||
case(0){ text=String(text,"\n",b) } // a.len()==b.len()
|
||||
case(1){ } // a.len>b.len()
|
||||
case(2){ text=a=b } // a.len>b.len()
|
||||
} //switch
|
||||
}
|
||||
println(text);
|
||||
Loading…
Add table
Add a link
Reference in a new issue