Family Day update
This commit is contained in:
parent
aac6731f2c
commit
9ad63ea473
2442 changed files with 39761 additions and 8255 deletions
|
|
@ -6,12 +6,12 @@ call bSort # /*invoke the bubble sort with
|
|||
call show ' after sort' /*show the after array elements. */
|
||||
exit /*stick a fork in it, we're all done. */
|
||||
/*──────────────────────────────────────────────────────────────────────────────────────*/
|
||||
bSort: procedure expose @.; parse arg n; m=n-1 /*N: is the number of @ array elements.*/
|
||||
do m=m for m by -1 until ok; ok=1 /*keep sorting the @ array until done.*/
|
||||
do j=1 for m; k=j+1; if @.j<=@.k then iterate /*elements in order? */
|
||||
_=@.j; @.j=@.k; @.k=_; ok=0 /*swap two elements; flag as not done.*/
|
||||
end /*j*/
|
||||
end /*m*/; return
|
||||
bSort: procedure expose @.; parse arg n /*N: is the number of @ array elements.*/
|
||||
do m=n-1 by -1 until ok; ok=1 /*keep sorting the @ array until done.*/
|
||||
do j=1 for m; k=j+1; if @.j<=@.k then iterate /*elements in order? */
|
||||
_=@.j; @.j=@.k; @.k=_; ok=0 /*swap two elements; flag as not done.*/
|
||||
end /*j*/
|
||||
end /*m*/; return
|
||||
/*──────────────────────────────────────────────────────────────────────────────────────*/
|
||||
gen: @.=; @.1 = '---letters of the Hebrew alphabet---' ; @.13= "kaph [kaf]"
|
||||
@.2 = '====================================' ; @.14= "lamed"
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ call bSort N /*invoke the bubble sort with
|
|||
call show ' after sort:' /*show the after array elements. */
|
||||
exit /*stick a fork in it, we're all done. */
|
||||
/*──────────────────────────────────────────────────────────────────────────────────────*/
|
||||
bSort: procedure expose @.; parse arg n; m=n-1 /*N: is the number of @ array elements.*/
|
||||
do m=m by -1 until ok; ok=1 /*keep sorting the @ array until done.*/
|
||||
bSort: procedure expose @.; parse arg n /*N: is the number of @ array elements.*/
|
||||
do m=n-1 by -1 until ok; ok=1 /*keep sorting the @ array until done.*/
|
||||
do j=1 for m; k=j+1; if @.j>@.k then parse value @.j @.k 0 with @.k @.j ok
|
||||
end /*j*/ /* [↑] swap 2 elements, flag as ¬done.*/
|
||||
end /*m*/; return
|
||||
|
|
|
|||
|
|
@ -10,14 +10,14 @@ call bSort N /*invoke the bubble sort with
|
|||
call show ' after sort:' /*show the after array elements. */
|
||||
exit /*stick a fork in it, we're all done. */
|
||||
/*──────────────────────────────────────────────────────────────────────────────────────*/
|
||||
bSort: procedure expose @.; parse arg #; m=#-1 /*N: is the number of @ array elements.*/
|
||||
bSort: procedure expose @.; parse arg # /*N: is the number of @ array elements.*/
|
||||
call disp /*show a snapshot of the unsorted array*/
|
||||
do m=m by -1 until ok; ok=1 /*keep sorting the @ array until done.*/
|
||||
do m=#-1 by -1 until ok; ok=1 /*keep sorting the @ array until done.*/
|
||||
do j=1 for m; k=j+1
|
||||
if @.j>@.k then do; parse value @.j @.k 0 with @.k @.j ok
|
||||
end
|
||||
end /*j*/ /* [↑] swap 2 elements, flag as ¬done.*/
|
||||
call disp /*show snapshot of partically sorted @.*/
|
||||
call disp /*show snapshot of partially sorted @. */
|
||||
end /*m*/; return
|
||||
/*──────────────────────────────────────────────────────────────────────────────────────*/
|
||||
gen: do j=1 for N; @.j= j; end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue